|
-
Dec 4th, 2000, 08:41 PM
#1
Thread Starter
New Member
How can I make it so when I resize my browser form, everything else fits on the form the same?
TJ
-
Dec 4th, 2000, 10:00 PM
#2
Addicted Member
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
-
Dec 4th, 2000, 10:00 PM
#3
Hyperactive Member
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
-
Dec 5th, 2000, 05:55 AM
#4
Thread Starter
New Member
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
-
Dec 5th, 2000, 09:16 AM
#5
Addicted Member
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.
-
Dec 5th, 2000, 06:49 PM
#6
Thread Starter
New Member
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
-
Dec 5th, 2000, 06:58 PM
#7
Thread Starter
New Member
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
-
Dec 6th, 2000, 12:07 AM
#8
Addicted Member
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.
-
Dec 6th, 2000, 06:27 AM
#9
Thread Starter
New Member
Thanks a lot for the help. I sent the vpg, vbp and the frm
TJ
-
Dec 6th, 2000, 08:36 AM
#10
Addicted Member
Hi, TRPlace. I have received them. I'll reply soon as possible.
-
Dec 6th, 2000, 11:26 AM
#11
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|