WOF:
I took your thoughts and came up with the following (the frame is intialized to dragMode=Manual)
This works very well....EXCEPT you have to move the frame a large distance before the form dragDrop will fire on mouse release...so if you need a minor position adjustment you have to set down the frame far away then pull it back into desired position...how come?
Code:Private Sub Frame1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Mx = X My = Y 'grab mouse coordinates Frame1.DragMode = 1 '(automatic) Frame1.Drag 'start dragging NOW End Sub '..... '..... Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single) Source.Move X - Mx, Y - My 'final resting spot Source.DragMode = 0 'back to manual (no dragging) End Sub




Reply With Quote