VB.NET Shaking Form Tutorial
Made by H3x0S
1.Make New Project in VB.NET
2.Place a button on the form.
3.Double click a button.
4.Type in this code:
Dim a As Integer ' <- Declaring integer "a"
While a < 10 ' <- Starting a "while loop"
Me.Location = New Point(Me.Location.X + 20, Me.Location.Y) ' <- Setting our form's X position to 20 pixels to right from it's current position.
System.Threading.Thread.Sleep(50) ' <- Telling a program to sleep for 50 miliseconds before continuing
Me.Location = New Point(Me.Location.X - 20, Me.Location.Y) ' <- Setting our form's X position to 20 pixels to left from it's current position.
System.Threading.Thread.Sleep(50) '<- Telling a program to sleep for 50 miliseconds before continuing
a += 1 ' <- Increasing integer "a" by 1 after each loop
End While ' <- Ending a while loop
If you want to change shanking duration, edit this line of code(replace 10 with some other number):
Code
While a < 10If you want to change interval between shakes, edit this lines(replace number 50 with some other number):
Code
System.Threading.Thread.Sleep(50)

