If ur actual need is to minimize application to sys tray when user clicks on minimize button,I have one method.Just check the WindowState property in a TimerElapsed or thread and if it is FormWindowState.Minimized then minimize to tray.
Best of luck
>Is there a way to add a "minimize to tray" button to a windows form''s title bar (.net)?
>Thanks in advance
WIWilliamJanuary 4, 2006 03:51 PM UTC
Yes you should add NotifyIcon control to your application. Then in the Form_Resize event check to see if the window state is being changed to minimized and then show the NotifyIcon control in the sysTray; Then allow a right click of the control to show a context menu strip and/or allow user to double click the NotifyIcon and it would open the application back to the previous state which you should have created a UserSetting to store the State of the window in!!