How can I make it so when I resize my browser form, everything else fits on the form the same?
TJ
Printable View
How can I make it so when I resize my browser form, everything else fits on the form the same?
TJ
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
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
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
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.
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
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
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.
Thanks a lot for the help. I sent the vpg, vbp and the frm
TJ
Hi, TRPlace. I have received them. I'll reply soon as possible.
Hi, TRPlace. I have sent back the code. If it doesn't reach you please tell me.