Results 1 to 3 of 3

Thread: scrollbar question [anyone?]

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2003
    Location
    US
    Posts
    68

    scrollbar question [anyone?]

    y is this not working anyone know

    VB Code:
    1. Public Sub HandleVScroll(ByVal sender As System.Object, ByVal se As System.Windows.Forms.ScrollEventArgs) Handles VScrollBar1.Scroll
    2.         ' Creates a graphics object and draws a portion
    3.         ' of the image in the PictureBox.
    4.         Dim g As Graphics = PB.CreateGraphics()
    5.         g.DrawImage(PB.Image, New Rectangle(0, 0, _
    6.             PB.Width - HScrollBar1.Width, _
    7.             PB.Height - VScrollBar1.Height), _
    8.             New Rectangle(HScrollBar1.Value, VScrollBar1.Value, _
    9.             PB.Width - HScrollBar1.Width, _
    10.             PB.Height - VScrollBar1.Height), GraphicsUnit.Pixel)
    11.     End Sub
    Last edited by NeonBurner; Jan 11th, 2004 at 01:49 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