ARTICLE

Minimize a Form to System Tray

Posted by Chitkaran Singh Articles | How do I November 30, 2007
This article demonstrates the technique of minimizing the windows form to system tray and not display it in the task bar of the windows.
Reader Level:
Download Files:
 

It is very easy to do this but needs a bit of imagination and skill. Here is the code snippet that does it all.

private void button1_Click(object sender, EventArgs e)

{

     if (minsys.Checked == true)

     {

          this.Visible = false;

     }

          this.WindowState = FormWindowState.Minimized;
}

This is the event handler of the minimize button.
 
Check the application and see how it works.

Login to add your contents and source code to this article
post comment
     

ma prjt wrk properly

Posted by Rijin M J Dec 31, 2011

what u mean by minsys when am trying i got error like this Error The name 'minsys' does not exist in the current

Posted by Rijin M J Dec 31, 2011

Hi..

 

The file that is supplied along with this has all the files along with the ".cs" file..

you can go through the ".cs" file and check how the code actually works..   and if u are not able to understand any part of it, you can leave a comment here and I wil definitely explain the full code here,,,

But, I really thank you for the suggestions that u have given me regarding the posting of the articles and explaining the code part..

I will definitely keep this stuff in mind and will try to be more explanatory in my next set of articles..

 

 

Thanx Buddy..

 

Posted by Chitkaran Singh Dec 20, 2007

Hi...

 

minsys is the name of one of the items of the "context menu " thats is applied ont the system tray...

When you click on it the first time, it is turned to "checked".. and then when you minimize the form, it is not shows in the taskbar and directly minimized to the system tray...

 

 

Posted by Chitkaran Singh Dec 20, 2007

however, you could have gone more by explaining more part of the code that actually displays the minimized icon on the system tray, since this is an article on how to do that. And also, you could provide some links for reference materials where other users can be benefited too. this is a very simple and direct approach solution for the task. thank you for sharing.

Posted by Randolph Alveyra Dec 18, 2007
COMMENT USING
PREMIUM SPONSORS
DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Get Career Advice from Experts