Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windows form not restoring from visible false
Message
De
05/03/2005 10:31:19
 
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Divers
Thread ID:
00992857
Message ID:
00993010
Vues:
32
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform