Originally Posted by
ikdekker
I have this code:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim lx As Integer = 41
Dim ly As Integer = 291
Dim stoprise As Integer = 175
Dim stopright As Integer = 100
Dim xsize As Integer = PictureBox1.Width
Dim ysize As Integer = PictureBox1.Height
Dim pbx As Double = PictureBox1.Location.X
Dim pby As Double = PictureBox1.Location.Y
If pbx < stopright Then
pbx = pbx + 1
xsize = xsize - 1
End If
If pby > stoprise Then
pby = pby - 1
ysize = ysize - 7
End If
If pbx = stopright And pby = stoprise Then
Timer1.Stop()
End If
End Sub
It does not work, the picturebox doesn't move or resize at all.