Results 1 to 11 of 11

Thread: Browser Resize

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Posts
    9

    Wink

    How can I make it so when I resize my browser form, everything else fits on the form the same?




    TJ

  2. #2
    Addicted Member
    Join Date
    Sep 2000
    Posts
    138
    Is this what you are after?
    Code:
    Private Sub Form_Resize()
    
    ¡®sglWidth and sglHeight are the ratios of the form in proportion of its original to the resized
    Dim sglWidth As Single
    Dim sglHeight As Single
    
    sglWidth = Me.ScaleWidth/Me.Width
    sglHeight = Me.ScaleHeight/Me.Height
    
    With Command1
        .Top = .Top * sglHeight
        .Left = .Left * sglWidth
    End With
    
    With Text1
    	.Top = .Top * sglHeight
    	.Left = .Left * sglWidth
    End With
    
    ¡®and so on
    
    End Sub

  3. #3
    Hyperactive Member theman32x's Avatar
    Join Date
    May 2000
    Location
    New Jersey, USA
    Posts
    305
    depending on the controls you have on ur prog ...

    you have to resize their widths n heights in the form_resize event ...

    whenever the form is resized you tell it what to controls to resize too

  4. #4

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Posts
    9
    Well I am new at this, I just want it so when the user click and drags it the rest will follow. And when you click maximize it will follow too.
    I copied and pasted teh code and it doesnt work, I am not sure what I have to change, but I did change the "With (I put combo1, because thats one of my things) Combo1", and With WebBrowser1
    But they dont follow the size of the form




    TJ

  5. #5
    Addicted Member
    Join Date
    Sep 2000
    Posts
    138
    Please try another code:
    Code:
    Private Sub Form_Resize()
    
        'The following figures are set at design time:
        'Form1 Width = 4800; Height = 3600
        'Combo1 Left = 1800; Top = 600; Width = 1455
        'Height of ComboBoxes is not resizable
        
        Dim w As Single
        Dim t As Single
        
        w = Me.ScaleWidth / 4800
        t = Me.ScaleHeight / 3600
            
        With Combo1
            .Left = 1800 * w
            .Top = 600 * t
            .Width = 1455 * w
        End With
    
    End Sub
    ------------------------------------------
    Hope it helps.

  6. #6

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Posts
    9
    Alright thanks a lot
    I am fixing it up a little bit but for the most part it works.
    I have an idea from a program that I saw on how I could make the browser save favorites.
    I will try it out but I may need help




    Thanks!



    TJ

  7. #7

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Posts
    9
    Well I kind of have a problem
    I cant get all these pixel numbers set right
    If you want I could send you the .frm
    Or I could just forget the resize and have it fixed
    Or I could try some more another day




    Tell me what you think

    Thanks


    TJ

  8. #8
    Addicted Member
    Join Date
    Sep 2000
    Posts
    138
    Hi, TRPlace. I'd like to have a look at your form. Please send it to: [email protected]. After I have examined it I'll give you a reply as soon as possible.

  9. #9

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Posts
    9
    Thanks a lot for the help. I sent the vpg, vbp and the frm




    TJ

  10. #10
    Addicted Member
    Join Date
    Sep 2000
    Posts
    138
    Hi, TRPlace. I have received them. I'll reply soon as possible.

  11. #11
    Addicted Member
    Join Date
    Sep 2000
    Posts
    138
    Hi, TRPlace. I have sent back the code. If it doesn't reach you please tell me.

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