Click here to Skip to main content
15,789,776 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have simple C# Application which have 5 forms and all the forms have minimize button but when i minimize one form and try to open other form it don't work any one give me solution thanks in advance.

What I have tried:

i have no code for this problems.
Updated 14-Sep-18 1:26am

1 solution

Depends what "it don't work" means, and how exactly you are trying to do things.

"It doesn't work" is probably the most useless problem report we get - and we get it a lot. It tells us nothing about what is happening, or when it happens.
So tell us what it is doing that you didn't expect, or not doing that you did.
Tell us what you did to get it to happen.
Tell us any error messages.
The better the information you give us, the better the help we can give you.

The way I would approach this is to have one from - the form that original opens when your app starts - open all the others, and take control of what happens when they are minimized (assuming that "minimized" means the same thing to you and I: reduced to the task bar but not closed).
When I created the form instance, I'd add two handlers: FormClosed (So I know it's supposed to be open or not) and Resize. In the later, I'd check the WindowState property of the form to see if it has been minimized:
private void MyOtherForm_Resize ( object sender , EventArgs e )
    Form f = sender as Form;
    if ( f != null && f.WindowState == FormWindowState.Minimized )
        ... restore or open the other form ...
Share this answer
Fahid Zahoor 14-Sep-18 15:40pm    
sorry for that i don't clearly tell you my problems let me Explain my problem again.
when i open any form by clicking on dashboard button and then i minimized the previously open form and try to open new form it doesn't work .but when i close previous form that i open from dashboard then i easily open new form.
But Now i want to open more then one form by minimizing the old form.
OriginalGriff 15-Sep-18 2:36am    
Stop trying to type the minimum possible - remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
So "it doesn't work" tells us nothing because we can't see what it does do, or even tell exactly what you expected to happen when you clicked the button.

The better the information you give us, the better the help we can give you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900