I have a windows application when I press the X button to close the application I want it still running in system tray. How can I go about it? I am using the Notify but I cannot work it out.Varun
Hook the Form Closing event and cancel it and set the visibility of the Form to false and set ShowInTaskbar to false as well. Then in the click event of your notifyicon, simply show the form. Your app will still show up when the users presses Alt-Tab however.
If this answers your question, please mark the question as answered.
Marcado como Respostavjsakec99quarta-feira, 4 de novembro de 2009 19:10
EditadoBigTuna99quarta-feira, 4 de novembro de 2009 18:51spelling
Hook the Form Closing event and cancel it and set the visibility of the Form to false and set ShowInTaskbar to false as well. Then in the click event of your notifyicon, simply show the form. Your app will still show up when the users presses Alt-Tab however.
If this answers your question, please mark the question as answered.
Marcado como Respostavjsakec99quarta-feira, 4 de novembro de 2009 19:10
EditadoBigTuna99quarta-feira, 4 de novembro de 2009 18:51spelling
Hook the Form Closing event and cancel it and set the visibility of the Form to false and set ShowInTaskbar to false as well. Then in the click event of your notifyicon, simply show the form. Your app will still show up when the users presses Alt-Tab however.
If a form isn't visible it won't show up in the Taskbar or in the Alt-Tab list.
Adding Additional Info: If the Icon file is not specified the system tray will not work. Creating new icon in the project and mapping it in the icon properties of "notify icon" should help.