Hi
How do you move a textbox with a mouse during runtime?
Any suggestion or help will be greatly appreciated
Printable View
Hi
How do you move a textbox with a mouse during runtime?
Any suggestion or help will be greatly appreciated
Try the drag-method
Code:'Allowing a form control to be movable (DRAG AND DROP)
'...ie textbox
Option Explicit
Public globalX As Integer
Public globalY As Integer
Private Sub Form_DragDrop(Source As Control, X As _
Single, Y As Single)
Text1.Move X - globalX, Y - globalY
End Sub
Private Sub TExt1_MouseDown(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
Text1.Drag vbBeginDrag
globalX = X
globalY = Y
End Sub
Thanks a lot guys!!!!!
Thats just what i am looking for :)