Results 1 to 2 of 2

Thread: Scrolling an image

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2000
    Location
    Staffodshire, England
    Posts
    32

    Question

    When you load an image into an imagebox it clips it to fit the box, how can i use scrollbars to move the image so i can see it all.

    Thanks in advance.

    Mark_Dep :P

  2. #2
    Lively Member
    Join Date
    May 2000
    Posts
    84
    Steps for image scrolling:

    Place a Picture Box on your form
    Place a Image Box in the Picture Box, Set autosize to true
    Place a horizontal scrollbar and a vertical scroll bar.

    after you load an image place this code

    HScroll1.Max=Image1.Width-Picture1.Width
    VScroll1.Max=Image1.Height-Picture1.Height

    in the change event of the scroll bars place code to shift the image

    Image1.left = -HScrolll.value
    Image1.Top = -VScrolll.value

Posting Permissions

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



Click Here to Expand Forum to Full Width