Hi this is my first tutorial, becuse non of the other was accepted

there where to many of them:P
ok i hope this tutorial will be approved
we will make like a vibrating picturebox in a form, worthless but you will learn how to use timers:^:
form size would be like
322; 334the first you will do is to open a new project (No shit) then add a:
Timer and a
pictureboxname the picturebox "
vibbox"
Timer
and set the interval to
20 and enabled to
truevibbox size would be like
282; 282just so you know that the vibbox will be a little bit smaller then the form
we need to add som variables
CODE
Dim speed As Single = 25 ' Ball Speed
Dim rndInst As New Random() ' Random instance
Dim xVel As Single = Math.Cos(rndInst.Next(5, 10)) * speed
Dim yVel As Single = Math.Sin(rndInst.Next(5, 10)) * speed
ok, now to the
right wall add this to the timer:
CODE
If vibbox.Location.X > Me.Width - vibbox.Size.Width - 0 Then
vibbox.Location = New Point(vibbox.Location.X, Me.Width - vibbox.Size.Width - 0)
xVel = -xVel
End If
ok now the vibbox only bounce on the right wall so now we gonna add the
left walladd this under the code above
CODE
If vibbox.Location.X < 0 Then
vibbox.Location = New Point(vibbox.Location.X, 0)
xVel = -xVel
End If
ok, now to the top wall
CODE
If gameball.Location.Y < 0 Then
gameball.Location = New Point(gameball.Location.X, 0)
yVel = -yVel
End If
ok, now to the buttom wall
CODE
If vibbox.Location.Y > Me.Height - vibbox.Size.Height - 45 Then
vibbox.Location = New Point(vibbox.Location.X, Me.Height - vibbox.Size.Height - 45)
yVel = -yVel
End If
that was the bounce code... run it, nothing happens i know
so we have to add another code just to get the box in movement
add it under the timer
CODE
vibbox.Location = New Point(vibbox.Location.X + xVel, vibbox.Location.Y + yVel)
that was everything for now have fun with your new vibrating thing