By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,575 Members | 1,293 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,575 IT Pros & Developers. It's quick & easy.

Maximised MDIChild bug?

P: n/a
If I set the windowstate property of my form to maximized in the designer,
when I open the form as an mdi child, it does not fill the whole of the mdi
parent form as it should. I can get around this by leaving the windowstate
as normal in the designer and changing the windowstate at runtime before the
form is displayed. Is this a known problem?
Jul 25 '07 #1
Share this Question
Share on Google+
10 Replies


P: n/a
I have run into this issue, and that is the only way I was able to fix it as
well.
I now leave all my windows to "normal" and set teh windowstate as i create
the object by code.

If you assign icons to the mdi child forms ... I have also noticed that some
icons do not display.
I have not found a solution for this yet.

Miro
"Phil" <N/Awrote in message
news:46**********************@ptn-nntp-reader02.plus.net...
If I set the windowstate property of my form to maximized in the designer,
when I open the form as an mdi child, it does not fill the whole of the
mdi parent form as it should. I can get around this by leaving the
windowstate as normal in the designer and changing the windowstate at
runtime before the form is displayed. Is this a known problem?

Jul 25 '07 #2

P: n/a
Hi Phil,

Could you please tell me the version of the Visual Studio you're using?

I performed tests in both VS.NET 2003 and VS 2005, but didn't reproduce the
problem in my tests.

I just set the MDI child form's WindowState property to Maximized at design
time. When the application is run, the MDI child form is shown and
maximized in its MDI parent.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 26 '07 #3

P: n/a
I get the same issue using Visual Studio.NET 2005 (with SP1 installed,
also got it before I installed SP1).

Jul 26 '07 #4

P: n/a
Hi Phil,

Since I couldn't reproduce the problem on my side, could you please send me
a sample project that could just reproduce the problem?

To get my actual email address, remove 'online' from my displayed email
address.

Thank you for your understanding and cooperation!

Sincerely,
Linda Liu
Microsoft Online Community Support

Jul 27 '07 #5

P: n/a

"dermot" <df*****@tommyfrench.co.ukwrote in message
news:11*********************@w3g2000hsg.googlegrou ps.com...
>I get the same issue using Visual Studio.NET 2005 (with SP1 installed,
also got it before I installed SP1).
Microsoft Visual Studio 2005
Version 8.0.50727.762 (SP.050727-7600)
Microsoft .NET Framework
Version 2.0.50727

Installed Edition: VB Express
Jul 27 '07 #6

P: n/a
Since I couldn't reproduce the problem on my side, could you please send
me
a sample project that could just reproduce the problem?
Hmmm.
I tried creating a new project, and I am not seeing the problem, so I guess
it must be something else in my project interferring with it somehow. I'll
have a bit of a play, and see if I can find what it is that triggers it.
Jul 27 '07 #7

P: n/a

"Phil" <N/Awrote in message
news:46**********************@ptn-nntp-reader02.plus.net...
>Since I couldn't reproduce the problem on my side, could you please send
me
a sample project that could just reproduce the problem?

Hmmm.
I tried creating a new project, and I am not seeing the problem, so I
guess it must be something else in my project interferring with it
somehow. I'll have a bit of a play, and see if I can find what it is that
triggers it.
OK. I think I have found it. I only get the error when I add a MenuStrip
control to my parent form.

Here are the steps to reproduce the problem.

Create ProjectWindows Application
AddWindows FormWindows Form
Form1 properties:
IsMDIContainer <- True
WindowState <- Maximized
ToolboxMenuStrip -Form1
Form 2 properties
WindowState <- Maximized
Form1.vb code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim frm As New Form2
frm.MdiParent = Me
frm.Show()
End Sub
Jul 27 '07 #8

P: n/a
Hi Phil,

Thank you for your response.

Follow your steps and I can reproduce the problem on my side.

A quick workaround is to set the MenuStrip's Visible property to false and
then back to true after the MDI child form is shown.

The following is a sample.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim frm As New Form2
frm.MdiParent = Me
frm.Show()
me.MenuStrip1.Visible = False
me.MenuStrip1.Visible = True
End Sub

I will check our inner database to see if it is a known issue in the next
Monday and then update in the newsgroup.

Thank you for reporting this to us!

Have a nice weekend!

Sincerely,
Linda Liu
Microsoft Online Community Support

Jul 27 '07 #9

P: n/a

"Linda Liu [MSFT]" <v-****@online.microsoft.comwrote in message
news:O0**************@TK2MSFTNGHUB02.phx.gbl...
Hi Phil,

Thank you for your response.

Follow your steps and I can reproduce the problem on my side.

A quick workaround is to set the MenuStrip's Visible property to false and
then back to true after the MDI child form is shown.
The workaround I found is to set WindowState for the child window to Normal
in the designer, and then set this to maximized in code, when the form is
instantiated.
Jul 27 '07 #10

P: n/a
Hi Phil,

Thank you for your prompt response.

Your workaround seems to be better than mine : )

I searched in our inner database and found a similar issue in it and it is
a known issue in .NET 2.0.

It points out that this is a layout problem when the WindowState property
is set inside a Suspend/ResumeLayout block.

It also points out that a simple workaround is to set the MDI child form's
WindowState somewhere else, e.g. in the form's constructor after the
InitializeComponent call or from the form's Load event.
Sincerely,
Linda Liu
Microsoft Online Community Support

Jul 30 '07 #11

This discussion thread is closed

Replies have been disabled for this discussion.