Click here to Skip to main content
13,771,078 members
Rate this:
 
Please Sign up or sign in to 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.
Posted 14-Sep-18 0:42am
Updated 14-Sep-18 1:26am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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 ...
        }
    }
  Permalink  
Comments
Member 13453474 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web04-2016 | 2.8.181119.1 | Last Updated 14 Sep 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100