Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows form not restoring from visible false
Message
From
05/03/2005 10:31:19
 
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00992857
Message ID:
00993010
Views:
33
This message has been marked as the solution to the initial question of the thread.
John,

I think what you want to look at is the .ShowInTaskBar property. Go ahead and Minimize the Form, but set this property to false. When you're ready to change the WindowState to Normal, then set .ShowInTaskBar back to true.
// To minimize it
this.WindowState = FormWindowState.Minimized;
this.ShowInTaskbar = false;

// To show it again
this.WindowState = FormWindowState.Normal;
this.ShowInTaskbar = true;
~~Bonnie


>Hi all,
>
>I'm having a problem where when my form is minimized I am sending it to the sys tray and visible false ( or form1.hide(); )
>On restoring from the sys tray I am setting the form to visible true ( also tried form1.show(); )
>
>The form name is showing in the taskbar but not on the screen, even under other forms.
>
>If I use the taskbar to maximize the form it then shows up, but set it to windowstate normal it disappears.
>
>Any ideas what trick I am missing.
>
>Many thanks John
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform