Results 1 to 2 of 2

Thread: resize n moving problem

  1. #1

    Thread Starter
    Hyperactive Member theman32x's Avatar
    Join Date
    May 2000
    Location
    New Jersey, USA
    Posts
    305

    Question

    i'm trying to make a graphic viewer with 2 scrollbars

    one horizontal n the other vertical

    i've managed to be able to scroll the graphic with the scrollbars. however, when the form is resize automatically or manually, the image control n scrollbars stay at their original positions.

    how can i make them go to their proper places when the form is resized?

    any help would be appreciated ... thanks

  2. #2
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Write some code in your Form_Resize Events

    Just past the following code into your Form_Resize events & it does what you want.

    Code:
    Private Sub Form_Resize()
    If WindowState <> vbMinimized Then
        Picture1.Width = ScaleWidth - VScroll1.Width
        Picture1.Height = ScaleHeight - HScroll1.Height
        VScroll1.Height = Picture1.Height
        VScroll1.Left = Picture1.Width
        HScroll1.Width = Picture1.Width
        HScroll1.Top = Picture1.Height
    End If
    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