ScaleHeight/ScaleWidth with borderless form - Not working, please help I am stumped 
Author Message
 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



Thu, 25 Jan 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. *** Need help with form ScaleWidth,ScaleHeight ***

2. ScaleWidth and ScaleHeight

3. scaleheight and scalewidth in .net

4. What happened to ScaleWidth and ScaleHeight

5. ScaleHeight, ScaleWidth - where?

6. Problems with height, scaleheight, width and scalewidth of various objects

7. ScaleHeight / ScaleWidth ?

8. Borderless Borderless Form

9. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

10. Borderless frame leaves streaks when .moveing it, please help

11. HELP with moving borderless forms around screen

12. shared variable not working what am I missing?

 

 
Powered by phpBB® Forum Software