VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Move your form in four Direction

by Aman Dogra (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 11th January 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Move your form in four Direction

API Declarations


'Take four timer

Rate Move your form in four Direction



Me.Left = 1000 + Me.Left
If Me.Left > 9300 Then
Timer1.Interval = 0
Timer2.Interval = 100
Else
Timer1.Interval = 100
End If
End Sub

Private Sub Timer2_Timer()
Me.Top = Me.Top + 1000
If Me.Top > 6500 Then
Timer2.Interval = 0
Timer3.Interval = 100
Else
Timer2.Interval = 100
End If
End Sub

Private Sub Timer3_Timer()
Me.Left = Me.Left - 1000
If Me.Left < 0 Then
Timer3.Interval = 0
Timer4.Interval = 100
Else
Timer3.Interval = 100
End If
End Sub

Private Sub Timer4_Timer()
Me.Top = Me.Top - 1000
If Me.Top < 0 Then
Timer4.Interval = 0
Timer1.Interval = 100
Else
Timer4.Interval = 100
End If
End Sub



Download this snippet    Add to My Saved Code

Move your form in four Direction Comments

No comments have been posted about Move your form in four Direction. Why not be the first to post a comment about Move your form in four Direction.

Post your comment

Subject:
Message:
0/1000 characters