In the mousemove of the control change the top and left position in "gridsize" increment.
Use something like "this.left=round(this.left/gridsize)*gridsize".
HTH :-)
>How do I get a drag & drop operation to show a snap to grid effect, the same as in the form diesigner when shifting controls?
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca