Home All Groups Group Topic Archive Search About

MdiChild Icon in Parent Form

Author
9 Oct 2007 7:35 PM
George
I have a windows form which can have one or many mdichild forms open inside it.

The problem I am having is the icon of the child form, when maximized in the
mdiparent often reverts to the .NET default icon, and I want to open them
maximized.

To get it displaying properly, when I open a child form, I need to open it
and set FormWindowState.Normal, and then FormWindowState.Maximized to get the
icon to display correctly.

This causes a flicker - can anyone help?? Removing the icon completely but I
can not manage this either.

Thanks.

Author
11 Oct 2007 12:09 AM
Robbe Morris - [MVP] C#
Hmm, never seen that.  What happens if the icon is left null at design time,
then set after you change the window state to maximum in the child window,
set the icon at runtime from say an ImageList?

--
Robbe Morris [Microsoft MVP - Visual C#]
..NET PropertyGrid Control - ListBox, ComboBox, and Custom Classes
http://www.eggheadcafe.com/tutorials/aspnet/270e9432-d236-47e7-b1af-5cd3abe27a75/net-propertygrid-control.aspx




Show quote
"George" <Geo***@discussions.microsoft.com> wrote in message
news:31C50041-4E28-4EA7-A0E8-D5862E8BF903@microsoft.com...
>I have a windows form which can have one or many mdichild forms open inside
>it.
>
> The problem I am having is the icon of the child form, when maximized in
> the
> mdiparent often reverts to the .NET default icon, and I want to open them
> maximized.
>
> To get it displaying properly, when I open a child form, I need to open it
> and set FormWindowState.Normal, and then FormWindowState.Maximized to get
> the
> icon to display correctly.
>
> This causes a flicker - can anyone help?? Removing the icon completely but
> I
> can not manage this either.
>
> Thanks.
Author
17 Oct 2007 7:34 PM
George
Doesn't help. The icon still defaults to the .NET icon.

Show quote
"Robbe Morris - [MVP] C#" wrote:

> Hmm, never seen that.  What happens if the icon is left null at design time,
> then set after you change the window state to maximum in the child window,
> set the icon at runtime from say an ImageList?
>
> --
> Robbe Morris [Microsoft MVP - Visual C#]
> ..NET PropertyGrid Control - ListBox, ComboBox, and Custom Classes
> http://www.eggheadcafe.com/tutorials/aspnet/270e9432-d236-47e7-b1af-5cd3abe27a75/net-propertygrid-control.aspx
>
>
>
>
> "George" <Geo***@discussions.microsoft.com> wrote in message
> news:31C50041-4E28-4EA7-A0E8-D5862E8BF903@microsoft.com...
> >I have a windows form which can have one or many mdichild forms open inside
> >it.
> >
> > The problem I am having is the icon of the child form, when maximized in
> > the
> > mdiparent often reverts to the .NET default icon, and I want to open them
> > maximized.
> >
> > To get it displaying properly, when I open a child form, I need to open it
> > and set FormWindowState.Normal, and then FormWindowState.Maximized to get
> > the
> > icon to display correctly.
> >
> > This causes a flicker - can anyone help?? Removing the icon completely but
> > I
> > can not manage this either.
> >
> > Thanks.
>
>

AddThis Social Bookmark Button