Weird MDI Issues

0 views
Skip to first unread message

Brian P. Hammer

unread,
Sep 7, 2003, 5:07:09 PM9/7/03
to
I too had the problem with the default icon. I tried all kinds of things
and the only thing I found to fix the issue was to a menu. When there is a
menu, it doesn't have the problem. This is OK for my app because I need the
menus. Don't know if this will help you out.


HTH,
Brian

"Alex Clark" <al...@theclarkhome.spamtin.net> wrote in message
news:O8J3yKY...@TK2MSFTNGP11.phx.gbl...
> Hi All,
>
> I'm having some weird issues with an MDI application I'm writing in
VB.NET.
> Apologies for the cross post to the VB newsgroup as well as the winforms
> one, but I'm not sure whether they affect Windows Forms as a whole or just
> VB.NET MDI apps.
>
> Firstly, if I have a child window open and maximized, and I break while
> debugging and resume, I seem to end up with 2 control boxes (see
weird1.jpg,
> attached). Okay, so this only happens whilst debugging, so it's not
really
> a serious issue, but it's strange nonetheless.
>
> Secondly, when an MDI child is first shown and it's maximized, I seem to
get
> the default .NET application icon in the top left instead of the icon that
> I've assigned to the form (see weird2.jpg, attached). This happens
whether
> or not I'm debugging. I've tried loading and displaying the MDI child in
> it's normal state first and then maximizing it programmatically, but it
> doesn't seem to fix it. The only thing that does seem to cure it is if
the
> user restores/minimizes the MDI window, and then maximizes it again. Then
> the correct icon is displayed.
>
> Anyone else experienced anything like this? I'm not doing anything
unusual
> with the MDI Parent/Children that I'm aware of.
>
> Thanks,
> Alex Clark
>
>
>


Ying-Shen Yu[MS]

unread,
Sep 9, 2003, 3:21:51 AM9/9/03
to
Hi Alex,
I can reproduce your second problem, and it seems the simpliest work
around (althogh a bit flicker)
is show the window first then set it maximized. I've posted this problem on
our internal discussion group to see if there's any better suggestions.
For your first problem, I'v tried a lot but can't reproduce it, maybe you
can send me an simple sample project to helpme reproduce this problem,
thanks!

Kind regards,

Ying-Shen Yu [MS]
Microsoft Support Engineer

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. 2001 Microsoft Corporation. All rights
reserved.
--------------------
| From: "Alex Clark" <al...@theclarkhome.spamtin.net>
| Subject: Weird MDI Issues
| Date: Sun, 7 Sep 2003 21:57:44 +0100
| Lines: 210
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <O8J3yKY...@TK2MSFTNGP11.phx.gbl>
| Newsgroups:
microsoft.public.dotnet.framework.windowsforms,microsoft.public.dotnet.langu
ages.vb
| NNTP-Posting-Host: pc4-basf3-5-cust169.nott.cable.ntl.com 81.106.151.169
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:135283
microsoft.public.dotnet.framework.windowsforms:51824
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms

Ying-Shen Yu[MS]

unread,
Sep 9, 2003, 3:27:07 AM9/9/03
to
Hi,
And I reproduce your second problem using C# win form, so I think it's an
winform problem, you may post your reply in this group, thanks

Ying-Shen Yu[MS]

unread,
Sep 11, 2003, 3:15:41 AM9/11/03
to
Hi Alex,
I apologize for the long delay.
It's a bug related to the MDI, and we have fixed it in the next
release of VS.NET, thanks!
for now I think there are two easy work around,
1. add a MainMenu on your MDI Container
2. Set your WindowState to Maximized after the MDI Child form has shown.

Thanks for leting us know this bug.


Best regards,

Ying-Shen Yu [MS]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "as is" with no warranties and confers no rights.

--------------------
| X-Tomcat-ID: 175559559
| References: <O8J3yKY...@TK2MSFTNGP11.phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: v-...@online.microsoft.com (Ying-Shen Yu[MS])
| Organization: Microsoft
| Date: Tue, 09 Sep 2003 07:27:07 GMT
| Subject: RE: Weird MDI Issues
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
| Message-ID: <2i#gZPqdD...@cpmsftngxa06.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Lines: 64
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:51918
| NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122

Ying-Shen Yu[MS]

unread,
Sep 11, 2003, 3:18:49 AM9/11/03
to
Hi Alex,
But I am still not able to reproduce the first problem you mentioned ,
maybe you can give me more description on how to reproduce the first
Problem,
Thanks!

Best regards,

Ying-Shen Yu [MS]


Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "as is" with no warranties and confers no rights.

--------------------
| X-Tomcat-ID: 175559559
| References: <O8J3yKY...@TK2MSFTNGP11.phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: v-...@online.microsoft.com (Ying-Shen Yu[MS])
| Organization: Microsoft
| Date: Tue, 09 Sep 2003 07:27:07 GMT
| Subject: RE: Weird MDI Issues
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
| Message-ID: <2i#gZPqdD...@cpmsftngxa06.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Lines: 64
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:51918
| NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
|

Alex Clark

unread,
Sep 13, 2003, 9:52:32 AM9/13/03
to
Hi,

(Sorry for the delay)
I've tried initially setting the MDI Child's window-style to normal and then
maximizing it after loading, but it doesn't seem to fix this icon issue. I
guess the only way will be to add a menu, but it's not really appropriate
for my app :-(

As for the first problem (with the 2 control boxes appearing), that only
occurs when I'm debugging through VS.NET and I hit a breakpoint, then
resume, with an MDI Child window open. It's not really serious because it
doesn't happen when the program's running in release mode on the customer's
machine :-)

I look forward to the next version of VS.NET!

Cheers,
Alex Clark

"Ying-Shen Yu[MS]" <v-...@online.microsoft.com> wrote in message
news:SiVLFUDe...@cpmsftngxa06.phx.gbl...

Ying-Shen Yu[MSFT]

unread,
Sep 14, 2003, 11:39:44 PM9/14/03
to
Hi Alex,
For limited information, I can't figure out why the miximizing after
loading didn't have effects on your system, You may do some simple tests to
see if it works. If it still doesnt work on your system, perhaps you may
give me some more info on this problem and let me investigate it.
Here is my test code for maximizing after showing the childform, you may
try it. You need create an CSharp windows applicaton project and replace
the file contents with the following codes, and add a new Form to your
project names ChildForm. Thanks!
<code filename="Form1.cs">
using System;
using System.Drawing;
using System.Windows.Forms;
namespace MDI_Test
{

/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;

public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();

//
// TODO: Add any constructor code after InitializeComponent call
//
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 273);
this.IsMdiContainer = true;
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);

}
#endregion

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}

private void Form1_Load(object sender, System.EventArgs e)
{
ChildForm child = new ChildForm();
child.MdiParent = this;
child.Show();
child.WindowState = FormWindowState.Maximized;
}
}
}
</code>

Best regards,

Ying-Shen Yu [MSFT]


Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

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

--------------------
| From: "Alex Clark" <al...@theclarkhome.spamtin.net>
| References: <O8J3yKY...@TK2MSFTNGP11.phx.gbl>
<2i#gZPqdD...@cpmsftngxa06.phx.gbl>
<SiVLFUDe...@cpmsftngxa06.phx.gbl>
| Subject: Re: Weird MDI Issues
| Date: Sat, 13 Sep 2003 14:52:32 +0100
| Lines: 144


| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

| Message-ID: <OVUOK5fe...@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.windowsforms


| NNTP-Posting-Host: pc4-basf3-5-cust169.nott.cable.ntl.com 81.106.151.169
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl

microsoft.public.dotnet.framework.windowsforms:52287
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms

Reply all
Reply to author
Forward
0 new messages