Results 1 to 4 of 4

Thread: picture box add scroll bar

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2004
    Posts
    169

    picture box add scroll bar

    I load a picture which is larger size than the picture box using
    "Set Picpaint.Picture = LoadPicture(fn)"

    I want to add horizontal and verticle scroll bar to the picture box.
    however, when I click the scroll bar, the picture in the picture box seems to be able to scroll, but the viewable picture size is not the original picture size but the same size as the picture box, how to fix it

    also, how can I make the scroll bar not showing if the picture size is smaller than the picture box?

    thank you

  2. #2
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: picture box add scroll bar

    set it's Visible property to false?

  3. #3
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: picture box add scroll bar

    Also, set the picturebox's AutoSize propert to False in order to retain the original picture size.

  4. #4
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: picture box add scroll bar

    Here is a little app that you can scroll a larger picture. If the picture is smaller that the picturebox then the scrollbars aren't visible.
    Attached Files Attached Files
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

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