Results 1 to 3 of 3

Thread: Unlimitted scroll bar of a picture box with.in a picture box

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2011
    Posts
    7

    Unlimitted scroll bar of a picture box with.in a picture box

    Does anyone know how to have an unlimitted scroll bar?..
    Cause i can only make it until 32767 twips.
    I need to increase it to have larger work space.

    Or can someone tell me the algorithm of zooming in/out a picture box inside a picture box?..i really need a large workspace cause im doing Critical path method with 1000 activities to fill in..

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Unlimitted scroll bar of a picture box with.in a picture box

    The max value of a VB scrollbar is limited to 32767.
    You didn't say what the scrollbar relates to: picturebox contents or the picturebox left/top properties for example: I'm assuming you have a picturebox in a picutrebox, or an image control within a picturebox. If that's true then change your picturebox's scalemode to pixels. This will give you 32767 pixels which is far larger than the screen (quite a large workspace indeed).
    BTW: 1 twip ~ 15 pixels
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3
    Lively Member Stupidiot's Avatar
    Join Date
    Apr 2011
    Location
    India
    Posts
    95

    Re: Unlimitted scroll bar of a picture box with.in a picture box

    For example: If You need to set 100000 as value

    You can double the value of scroll bar like this:

    Dim x As Long

    Private Sub Command1_Click()
    MsgBox x
    End Sub

    Private Sub Form_Load()
    VScroll1.Max = 10000
    End Sub

    Private Sub VScroll1_Change()
    x = VScroll1.Value
    x = x * 1000 / 100
    'Picture1.Top = x
    End Sub

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