Nov 9th, 1999, 09:12 PM
Using the below code, I give a control the ability to be repositioned by the user.
The only problem is that when the control has been moved in this method, querying the Left and Top properties return the original values from before the move. In a UserControl, quering the Extender object properties does the same.
Is there a way to tell Windows/Visual Basic that the control has moved so the properties can be updated.
Code:
Public Sub ForceWindowMove(hWnd As Long)
ReleaseCapture
SendMessage hWnd, &HA1, 2, 0&
End Sub
------------------
Richard Moss
ariad@globalnet.co.uk
http://www.users.globalnet.co.uk/~ariad/
The only problem is that when the control has been moved in this method, querying the Left and Top properties return the original values from before the move. In a UserControl, quering the Extender object properties does the same.
Is there a way to tell Windows/Visual Basic that the control has moved so the properties can be updated.
Code:
Public Sub ForceWindowMove(hWnd As Long)
ReleaseCapture
SendMessage hWnd, &HA1, 2, 0&
End Sub
------------------
Richard Moss
ariad@globalnet.co.uk
http://www.users.globalnet.co.uk/~ariad/