|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Form MinimizeI 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 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 > > > 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 >> >> >> > > 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 >>> >>> >>> >> >> > >
Other interesting topics
Increase all digits in a number(string) one step
Anonymous Methods As ThreadStarts Sockets, to be continued... string dictionary and memory issue. How to Anonymous IP address in C# Refering to Object Members in A Collection in an ASP.NET BoundColu finding the current user name accessing an ASP.NET page What is wrong with this Producer-Consumer sample? Desing problem Regular Expresions |
|||||||||||||||||||||||