
ScaleHeight/ScaleWidth with borderless form - Not working, please help I am stumped
I am using VB5.0 SP3
This is a two-part question which are very related to each other in
terms of using scale height and scale width on a borderless child form
I have an MDI form (MDIForm1) with several childs (Form1, Form2 etc).
The border style is set to 0 (none) for all the child forms and the
WindowState is normal.
The MDI form is maximized and I would like to have it like that for
the most part and have the child forms maximized within the parent
form. My problem is that I am getting a gap (quarter inch or so on the
bottom and right of the form so that the child form is not REALLY
maximized because there is a gap. I am using a menu to navigate
between these maximized child forms.
Here is my code
Private Sub Form_Activate()
Form1.Left = 0
Form1.Top = 0
Form1.Height = MDIForm1.ScaleHeight
Form1.Width = MDIForm1.ScaleWidth
End Sub
========================
Also - I am having a similar problem with frames within the form that
is being scaled. I would like the frames to be the same size as the
form, but I cannot get this to work at all. Again, here is my code
Private Sub Form_Load()
Dim i As Integer
'Iterate through the frames
For i = 0 To fraStep.Count - 1
With fraStep(i)
.Height = Form1.ScaleHeight
.Width = Form1.ScaleWidth
.Left = 0
.Top = 0
End With
Next i
'This was from Microsoft Wizard Wizard - if I do not have this, my
'picture boxes are chopped off on the left ??
For i = 0 To fraStep.Count - 1
fraStep(i).Left = -10000
Next
End Sub
I hope someone can help - I am having a really tough time with this
for something that I thought would be straight forward. I tried having
the WindowState = 2 for a borderless form, but it would not even
display.
Thanks in advance,
Don