VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Shake the form in two to three lines of code

by Swapnil Galgali (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 8th June 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Shake the form in two to three lines of code

Rate Shake the form in two to three lines of code



Timer1.Enabled = True
End Sub

Private Sub Command2_Click()
Timer2.Enabled = True
End Sub

Private Sub Command3_Click()
Timer1.Enabled = False
Timer2.Enabled = False
End Sub

Private Sub Form_Load()
Form1.Left = 0
Form1.Top = 0
End Sub

Private Sub Timer1_Timer()
If Form1.Left = 0 Then
  Form1.Left = 100
Else
  Form1.Left = 0
End If
End Sub

Private Sub Timer2_Timer()
If Form1.Top = 0 Then
  Form1.Top = 100
Else
  Form1.Top = 0
End If
End Sub


Download this snippet    Add to My Saved Code

Shake the form in two to three lines of code Comments

No comments have been posted about Shake the form in two to three lines of code. Why not be the first to post a comment about Shake the form in two to three lines of code.

Post your comment

Subject:
Message:
0/1000 characters