[C#] Hiding an application to the system tray
Ok, so I am new to this whole coding thing but I am trying to learn im using Microsoft visual c# express edition and im trying to make my application go to the system tray and not be left in the task bar. I want to make a button so you just press it and it minimizes into the system tray.
I'm following this tutorial: http://www.developer.com/net/csharp/article.php/3336751
And I'm stuck at the event handler how do I make one? This is probly an easy question to solve but as i said I'm new to the coding world.
Thanks!
Re: [C#] Hiding an application to the system tray
Simply add in a button to your form, and double click it. C# will automaticly generate an event handler for you (the on button press event).
Simpy add
to your on button press event, and the form will hide itself.
Of course you will also need to do something with the tray icon, once it is double clicked, show the form again.
Re: [C#] Hiding an application to the system tray
Thank You Method! Now i need to work out how to bring it back.
Anyone know how to bring it back once you double click the tray icon?
EDIT: Jeax helped me told me to add in the event
this.Show();
Re: [C#] Hiding an application to the system tray
mm... does this works on ... C++ (also seems very logical :D)
Re: [C#] Hiding an application to the system tray
Could you thelp me if I wanted a Form to Automaticly hide to system tray when it loads ?
Re: [C#] Hiding an application to the system tray
Go to your project click the main form or the startup form and then look at the main properties box and there should be something like `minimised` and you put either 0 or 1 in it I'm pretty sure.
Re: [C#] Hiding an application to the system tray