Results 1 to 10 of 10

Thread: [RESOLVED] weird error?

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2012
    Posts
    142

    Resolved [RESOLVED] weird error?

    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.
    Last edited by ikdekker; Jan 28th, 2012 at 01:36 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width