Skip to content

Instantly share code, notes, and snippets.

@JacquesInnocent
Created October 15, 2017 16:16
Show Gist options
  • Save JacquesInnocent/997f933614a800420cbc3f168b811a1d to your computer and use it in GitHub Desktop.
Save JacquesInnocent/997f933614a800420cbc3f168b811a1d to your computer and use it in GitHub Desktop.
Dim vel, hdir As Double
Private Sub Stop_Click()
Timer1.Enabled = False
label2.Caption = Shape1.Left + 1
label3.Caption = Val(label1.Caption) + Val(label2.Caption)
End Sub
Private Sub Origin_Click()
Shape1.Left = sendback
End Sub
Private Sub Form_Load()
vel = 30
hdir = 1
End Sub
Private Sub relocate_Click()
Dim variable As Integer
variable = 2000
Shape1.Refresh
Shape1.Left = Shape1.Left + variable
End Sub
Private Sub label1_Click()
End Sub
Private Sub label3_Click()
label3.Caption = Val(label1.Caption) + Val(label2.Caption)
End Sub
Private Sub Timer1_Timer()
Shape1.Left = Shape1.Left + 1500
Shape1.Left = Shape1.Left - 1500
Dim variable As Integer
variable = 100
Shape1.Left = (Shape1.Left + variable)
label1.Caption = Shape1.Left + 15
If Shape1.Left + Shape1.Width >= (Shape2.Left + Shape2.Width) Then
Shape1.Left = Shape2.Width
End If
End Sub
Private Sub Timer4_Timer()
Shape2.Left = Shape2.Left + (hdir * vel)
End Sub
Private Sub Timer2_Timer()
Timer2.Enabled = False
Shape1.Left = Shape1.Left + 2000
Shape1.Left = Shape1.Left - 2000
Dim variable As Integer
variable = 15
Shape1.Left = Shape1.Left + variable
label2.Caption = Shape1.Left + 15
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment