none
viewing a large image RRS feed

  • Question

  • I have loaded an image 3893 x 5161 pixels in size, using ImageList.LoadImage().  I have tried setting the graphics window size by using Desktop.Width and Desktop.Height or ImageList.GetWidthOfImage and similar for height, but can only view a small portion of the image.  Is there any support for scroolbars or any other way of viewing the whole image?
    I don't want to resize the image.

    occasional programmer, still learning VB
    Monday, March 15, 2010 4:29 PM

Answers

  • I just had to do this too.  You can move the image around in the window by modifying the images top/left properties.  You could do this by looking at the arrow keys to step them around, or even build some graphic arrows or scroll bars out of rectangles/images and look for mouse clicks on top of the areas.

    • Marked as answer by treble1999 Monday, March 15, 2010 10:07 PM
    Monday, March 15, 2010 5:24 PM

All replies

  • I just had to do this too.  You can move the image around in the window by modifying the images top/left properties.  You could do this by looking at the arrow keys to step them around, or even build some graphic arrows or scroll bars out of rectangles/images and look for mouse clicks on top of the areas.

    • Marked as answer by treble1999 Monday, March 15, 2010 10:07 PM
    Monday, March 15, 2010 5:24 PM
  • You can also resize an image and place it anywhere in the GraphicsWindow.

    GraphicsWindow.DrawResizedImage(imageName,x,y,width,height)

    To make this full screen (inside the GraphicsWindow - whatever size this is)

    GraphicsWindow.DrawResizedImage(imageName,0,0,GraphicsWindow.Width,GraphicsWindow.Height)


    where

    imageName = ImageList.LoadImage("C:/...") OR

    imageName = ImageList.LoadImage("http://...")
    Monday, March 15, 2010 7:02 PM
    Moderator
  • Thanks, bigdaddyo, that's what I'll do.  Sorry, litdev, I did say I didn't want to resize it. 


    occasional programmer, still learning VB
    Monday, March 15, 2010 10:08 PM