Results 1 to 2 of 2

Thread: How to move, zoom in-out a picturebox runtime?

  1. #1
    unique.suren's Avatar
    unique.suren is offline VB.NET Forum Newbie
    .NET Framework
    .NET 3.5
    Join Date
    Nov 2011
    Location
    Jaipur
    Posts
    1
    Reputation
    0

    How to move, zoom in-out a picturebox runtime?

    Hi,
    How i can move,zoom in-out the picturebox during runtime on a form or groupbox? If anybody can provide me code...i'll be very grateful to him/her...
    Thanx in advance...

  2. #2
    jmcilhinney's Avatar
    jmcilhinney is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    11,358
    Reputation
    1544
    You pretty much can't. You need to think a bit laterally. Add a Panel to your form and set its Size to whatever area you want the user to see of the picture. Add a PictureBox to that Panel and set its SizeMode to Zoom. When you load an Image into the PictureBox, set its Size appropriately to just accommodate the whole thing. You can now change the Top and Left of the PictureBox to pan and the Size to zoom.

Tags for this Thread

Bookmarks

Posting Permissions

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