Hello all mate from daniweb, well today i got some trouble may be someone kind can help me i wanna know how to add scroll bars to the picture box so the we can scroll to view the whole image.

<div style="overflow:scroll;width:100px; height:100px">
  <img src="images/a1.jpg"/>
</div>
<div style="overflow:scroll;width:100px; height:100px">
  <img src="images/a1.jpg"/>
</div>

can i use this in vb.net win forms

Paste following code in form_load event

Dim pan As New Panel
        pan.Location = New Point(30, 30)
        pan.Size = New Size(200, 200)
        pan.AutoScroll = True

        Dim pic As New PictureBox
        'Change the path/name of image file
        pic.Image = Image.FromFile("c:\windows\web\wallpaper\friend.jpg")
        pic.SizeMode = PictureBoxSizeMode.AutoSize

        pan.Controls.Add(pic)
        Me.Controls.Add(pan)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.