G
Garry
While trying to write good 'best practices' vb.net code to 'show'
consecutive MDI child forms, suddenly the forms were cascaded.
This is not what I want.
Does anyone know how to 'turn this off'?????
Also, when I resize the child form to fit the Client of the parent MDI, to
get the correct values, I use the following code.
Shared Sub FitChildToMDI(ByVal frmMDI As Form, ByVal frmChild As Form)
frmChild.Top = 0
frmChild.Left = 0
frmChild.Height = frmMDI.ClientRectangle.Size.Height - 4
frmChild.Width = frmMDI.ClientRectangle.Size.Width - 4
End Sub
If I subtract less than 4, I get scroll bars which I definately do not want.
Why do I need the minus 4???? Iz there some property of the client rectangle
which has a value 4 at the screen resolution that I am using BUT may have a
different value for a different screen resolution.
Microsoft HELP was very very very very helpful on this point and I got 100
results to my query 'ClientRectangle'. None of them even intimated an answer
to these questions. There was loads and loads and loads and loads of info on
stuff that had no relavence to my problems.
Is it me or is it Microsoft?????
Garry
consecutive MDI child forms, suddenly the forms were cascaded.
This is not what I want.
Does anyone know how to 'turn this off'?????
Also, when I resize the child form to fit the Client of the parent MDI, to
get the correct values, I use the following code.
Shared Sub FitChildToMDI(ByVal frmMDI As Form, ByVal frmChild As Form)
frmChild.Top = 0
frmChild.Left = 0
frmChild.Height = frmMDI.ClientRectangle.Size.Height - 4
frmChild.Width = frmMDI.ClientRectangle.Size.Width - 4
End Sub
If I subtract less than 4, I get scroll bars which I definately do not want.
Why do I need the minus 4???? Iz there some property of the client rectangle
which has a value 4 at the screen resolution that I am using BUT may have a
different value for a different screen resolution.
Microsoft HELP was very very very very helpful on this point and I got 100
results to my query 'ClientRectangle'. None of them even intimated an answer
to these questions. There was loads and loads and loads and loads of info on
stuff that had no relavence to my problems.
Is it me or is it Microsoft?????
Garry