MDI Form Maximise

N

Neil Gutteridge

Hi,

I am a novice to MS Visual Basic .NET 2003 and hope I am posting this
question to the correct newsgroup. Apologies if not.

I have created an MDI form and have added a treeview and splitter control to
the form. In the remainder of the window I want to display a maximized form.
When I create, maximize and show the MDI Child form it is not scaling
correctly so part of the form is hidden. When I manually resize the MDI
form, the MDI Child form instantly changes to display correctly?!?!?!?!?

I have searched google and it appears to be an issue with .NET 2003 but
unfortunately all fixes offered do not appear to correct the problem. Can
anyone help?

Thanks

Neil Gutteridge
 
J

Jeffrey Tan[MSFT]

Hi Neil ,

Thanks for your post.

Yes, you are in the correct newsgroup.

You may first give a try to "Jared"'s suggestion. If it still does not
resolve your problem, can you provide a little sample or some detailed
steps to help us reproduce your problem?

I look forward to hearing from you. Thanks!

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
N

Neil Gutteridge

Hi Jared,

Thank you for taking the time to reply. This didn't fix the problem, however
I did find the answer. My MDI Child forms were inherited from a template MDI
Child form. By changing the Inherits statement for the form I was attempting
to display back to System.Windows.Forms.Form the form started to display
correctly. What do they say about running before you can walk????

Thanks anyway

Neil
 
N

Neil Gutteridge

Hi Jared,

I posted prematurely! This was not the fix for the problem. The conditions
under which the form was not displaying correctly was when the control box,
maximize and minimize buttons were hidden and the form was maximized. I
found a fix which was as follows:

oOpenForm = New frmUser

With oOpenForm
.MdiParent = Me
.ControlBox = False
.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
.MaximizeBox = False
.MinimizeBox = False
.StartPosition = System.Windows.Forms.FormStartPosition.Manual
.WindowState = FormWindowState.Normal
.Dock = DockStyle.Fill
.Show()
End With

Thanks anyway

Neil Gutteridge
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top