by JAGADISH BABU (2 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 8th July 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
MOVING TEXT BOX WHEN THE APPLICATION IS RUNNING
API Declarations
'SPECIFY THE MOVING SPEED OF THE TEXT2 IN THE TEXT1
'BY USING THE ARROW KEYS U CAN MOVE THE TEXT BOX
If KeyCode = 39 Then
Text2.Left = Text2.Left + Val(Text1.Text)
End If
If KeyCode = 40 Then
Text2.Top = Text2.Top + Val(Text1.Text)
End If
If KeyCode = 38 Then
Text2.Top = Text2.Top - Val(Text1.Text)
End If
If KeyCode = 37 Then
Text2.Left = Text2.Left - Val(Text1.Text)
End If
End Sub