Article ID: 113904
Article Last Modified on 11/18/2003
Dim moving_flag% 'moving flag to toggle moving ability
Sub Command1_Click ()
moving_flag% = 1 'start the text box moving with the mouse
End Sub
Sub Form_Load ()
moving_flag% = 0 ' Initially set the flag to turn off the moving.
Command1.Caption = "Turn moving on"
End Sub
' Enter the following two lines as one, single line:
Sub Form_MouseMove (Button As Integer, Shift As Integer, x As Single,
y As Single)
If moving_flag% = 1 Then ' Condition to call the moving procedure.
Text1.Move x, y
End If
End Sub
Sub Text1_Click ()
moving_flag% = 0
End Sub
Additional query words: 2.00 3.00
Keywords: KB113904