Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jan 2007
    Posts
    117
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Zoom on PictureBox1?

    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

    Else
    If result = Windows.Forms.MouseButtons.Right Then

    End If
    End If
    End Sub

  • #2
    Regular Coder
    Join Date
    Jan 2007
    Posts
    117
    Thanks
    4
    Thanked 2 Times in 2 Posts
    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.


  •  

    Posting Permissions

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