View Full Version : Zoom on PictureBox1?

01-24-2007, 02:27 PM
I have a windows form that has a picture box and a listbox on it. As the user selects a file from the listbox, the image is displayed in the picturebox control. However, the image is hard to make out. I want to give the ability to zoom in and zoom out on the image by clicking the left or right mouse buttons. Can this be done? I have set up the following sub in order to handle it, but I'm not sure the correct methods or properties to use on Me.PictureBox1 in order to accomplish. Thanks.

Private Sub PictureBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
Dim result As MouseButtons

If result = Windows.Forms.MouseButtons.Left Then

If result = Windows.Forms.MouseButtons.Right Then

End If
End If
End Sub

01-24-2007, 03:50 PM
Well I did some searching around and came across another board where someone recommended scrapping picturebox1 and writing your own zoompicbox control. Turns out the project I am working on is not worthy of that much attention to spend time doing this and thus not needed.