Link to home
Start Free TrialLog in
Avatar of juliodiz
juliodiz

asked on

How can i restore my application from taskbar in c#?

How can i restore my application from taskbar in c#?
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Under what conditions?

Maybe something like?

            if (this.WindowState == FormWindowState.Minimized)
            {
                this.WindowState = FormWindowState.Normal;
            }
There is one property, ShowInTaskBar.....
If you want to show your UI in taskbar, you can make it true else false.
Avatar of juliodiz
juliodiz

ASKER

I try


        if (this.WindowState == FormWindowState.Minimized)
            {
                this.WindowState = FormWindowState.Normal;
            }

But didnt work.

Because when have a problem if the application is minimized i need to restore to the user see the problem.
If the application is not the foreground window then you also need to use the SetforegroundWindow() API to bring it to the front.
So

        if (this.WindowState == FormWindowState.Minimized)
            {
                this.WindowState = FormWindowState.Normal;
                SetforegroundWindow();
            }

?


ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Didnt work  , not restore from the task bar

he stays in the taskbar minimized.
Does the taskbar by chance blink?

If not, give us more details about the setup and the conditions under which you need the app to restore.
I have a form Logado, and i need when have a problem the operator see the problem, but if the program is minimzed the operator will not see the problem.

So i need to restore the form from the taskbar
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial