Home All Groups Group Topic Archive Search About
Author
10 Mar 2006 4:15 PM
Brian Patterson
I have an application with a main form (FormA).  This form is borderless
because we have a lot of skin action going on.  The form creates and
displays a second form (FormB) via formB.Show().  When we minimize FormA it
also minimizes FormB.  Is there any way to prevent this?  I have played
around with CreateParams with no luck.

TIA!
Brian

Author
10 Mar 2006 4:57 PM
Marc Gravell
This is the default behaviour when ownership is specified (as illustrated by
example below); so - do you really need the ownership, or can it be managed
else-wise?

static void Main(string[] args)
        {
            Form x = new Form();
            x.Text = "Parent x";
            Form y = new Form();
            y.Text = "Child y";
            y.Owner = x;
            x.Show();
            y.Show();
            Form a = new Form();
            a.Text = "Unrelated a";
            Form b = new Form();
            b.Text = "Unrelated b";
            a.Show();
            b.Show();
            Form app = new Form();
            app.Text = "Kill app";
            Application.Run(app);
        }

Show quoteHide quote
"Brian Patterson" <br***@redeyepos.com> wrote in message
news:eISkl2FRGHA.1576@tk2msftngp13.phx.gbl...
>I have an application with a main form (FormA).  This form is borderless
>because we have a lot of skin action going on.  The form creates and
>displays a second form (FormB) via formB.Show().  When we minimize FormA it
>also minimizes FormB.  Is there any way to prevent this?  I have played
>around with CreateParams with no luck.
>
> TIA!
> Brian
>
>
>
Are all your drivers up to date? click for free checkup

Author
10 Mar 2006 9:25 PM
Brian Patterson
That is exactly my problem.  I am not setting any owner information.  If I
set a breakpoint in the constructor of my FormB - and view the Owner and
Parent properties - they are both null.

Ideas?

Brian Patterson
Show quoteHide quote
"Marc Gravell" <m***@nonesuch.com> wrote in message
news:OseJ2OGRGHA.4608@tk2msftngp13.phx.gbl...
> This is the default behaviour when ownership is specified (as illustrated
> by example below); so - do you really need the ownership, or can it be
> managed else-wise?
>
> static void Main(string[] args)
>        {
>            Form x = new Form();
>            x.Text = "Parent x";
>            Form y = new Form();
>            y.Text = "Child y";
>            y.Owner = x;
>            x.Show();
>            y.Show();
>            Form a = new Form();
>            a.Text = "Unrelated a";
>            Form b = new Form();
>            b.Text = "Unrelated b";
>            a.Show();
>            b.Show();
>            Form app = new Form();
>            app.Text = "Kill app";
>            Application.Run(app);
>        }
>
> "Brian Patterson" <br***@redeyepos.com> wrote in message
> news:eISkl2FRGHA.1576@tk2msftngp13.phx.gbl...
>>I have an application with a main form (FormA).  This form is borderless
>>because we have a lot of skin action going on.  The form creates and
>>displays a second form (FormB) via formB.Show().  When we minimize FormA
>>it also minimizes FormB.  Is there any way to prevent this?  I have played
>>around with CreateParams with no luck.
>>
>> TIA!
>> Brian
>>
>>
>>
>
>
Author
13 Mar 2006 9:53 AM
Marc Gravell
To be honest, there's not a lot to go on without some kind of illustrative
code here: for instance, what is the respecitve modality of the forms? Are
you using .Show, .ShowDialog, or Application.Run, etc? How the forms are
being created? disposed?

Marc
Show quoteHide quote
"Brian Patterson" <br***@redeyepos.com> wrote in message
news:%239f$3jIRGHA.1096@TK2MSFTNGP11.phx.gbl...
> That is exactly my problem.  I am not setting any owner information.  If I
> set a breakpoint in the constructor of my FormB - and view the Owner and
> Parent properties - they are both null.
>
> Ideas?
>
> Brian Patterson
> "Marc Gravell" <m***@nonesuch.com> wrote in message
> news:OseJ2OGRGHA.4608@tk2msftngp13.phx.gbl...
>> This is the default behaviour when ownership is specified (as illustrated
>> by example below); so - do you really need the ownership, or can it be
>> managed else-wise?
>>
>> static void Main(string[] args)
>>        {
>>            Form x = new Form();
>>            x.Text = "Parent x";
>>            Form y = new Form();
>>            y.Text = "Child y";
>>            y.Owner = x;
>>            x.Show();
>>            y.Show();
>>            Form a = new Form();
>>            a.Text = "Unrelated a";
>>            Form b = new Form();
>>            b.Text = "Unrelated b";
>>            a.Show();
>>            b.Show();
>>            Form app = new Form();
>>            app.Text = "Kill app";
>>            Application.Run(app);
>>        }
>>
>> "Brian Patterson" <br***@redeyepos.com> wrote in message
>> news:eISkl2FRGHA.1576@tk2msftngp13.phx.gbl...
>>>I have an application with a main form (FormA).  This form is borderless
>>>because we have a lot of skin action going on.  The form creates and
>>>displays a second form (FormB) via formB.Show().  When we minimize FormA
>>>it also minimizes FormB.  Is there any way to prevent this?  I have
>>>played around with CreateParams with no luck.
>>>
>>> TIA!
>>> Brian
>>>
>>>
>>>
>>
>>
>
>

Bookmark and Share