When the User Control is a child of the main Form I can move it around the Form and it will follow the mouse pointer using the following code:
ReleaseCapture
SendMessage UCimg1.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, ByVal 0&
However when I make it the child of the Desktop it does not move with the mouse pointer but rather it will stay in it's place as the mouse is moved and then when the mouse is released the UC will position itself at the mouse pointer.
The above does not occur if I use a Form instead of a User Control in which case it will follow the mouse pointer
Any one understand why this occurs with the UC but not the Form?
ReleaseCapture
SendMessage UCimg1.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, ByVal 0&
However when I make it the child of the Desktop it does not move with the mouse pointer but rather it will stay in it's place as the mouse is moved and then when the mouse is released the UC will position itself at the mouse pointer.
The above does not occur if I use a Form instead of a User Control in which case it will follow the mouse pointer
Any one understand why this occurs with the UC but not the Form?