two forms

  • Thread starter Thread starter Stormy
  • Start date Start date
S

Stormy

I am working on an app(C#) with two forms A and B. form A is the main
form and form B is created in A's constructor. when I minimize both of
them. they all shown on taskbar as A and B. my problem is when I click
B, A is always maximized. but I want click B and B maximized. click A
and A maximized.

Is there a good way to correct my problem? thanks
 
Hi Cor,

I'm not quite sure what the question is you are asking.
And I am not quite sure what the relevance of "ShowInTaskbar" is to the
OP's question.
The OP asked about why A gets maximised when B is clicked on from the
task bar.
To my knowledge they do not want to hide/show items on the taskbar.

I apologise if I have misunderstood anything about the posts from
yourself or the OP.

Regards,
Steven
 
Steven,

I am as well not sure from the question from the OP therefore I directed it
too you, sorry for any confusing from my side.

Cor
 
Stormy ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸:
I am working on an app(C#) with two forms A and B. form A is the main
form and form B is created in A's constructor. when I minimize both of
them. they all shown on taskbar as A and B. my problem is when I click
B, A is always maximized. but I want click B and B maximized. click A
and A maximized.

Is there a good way to correct my problem? thanks

Properties of win form state can be maximized when the Click on form is
detected ?
 
Thank you very much for the reply.

Here is my code: Form A's maximize property set as true, and B's
minimize property set as true. I create a button on each of the form,
when you click it, its form will be minimized and another form will be
maximized.
I use B.WindowState = FormWindowState.Maximized;

public class A : System.Windows.Forms.Form
{

//FormB derived from System.Windows.Forms.Form
private FormB B;

public A()
{
B= new FormB();
B.Owner = this;
B.Show();
}
}

Here is my new found.
1 . if I enable maximize button of both forms. when I minimize both
of them and click A on taskbar(not notifyicon), the B form will be pop
up.
2. if I disable maximize button of both forms, when I minimize both
of them. some time only A displayed on taskbar, if I click it, B will
pop up. sometime they both displayed on taskbar, click one of them and
it will pop up right form.
 
Back
Top