overlapping controls

.paul.

Well-known member
Joined
May 22, 2007
Messages
212
Programming Experience
1-3
how can i determine if 1 control is or will overlap another control if i move it?

for example

textbox1- left = 168, top = 111, width = 10, height = 36
picturebox1 - left = 160, top = 108, width = 18, height = 18

i'm working with high precision and little room for error.
any ideas?
 
Rectangle.IntersectsWith Method

In case you were working in designer and wanted to put controls closer than the default snap you can set Margin property to 0 and the controls will snap close up.
 
Back
Top