Username: Save?
Password:
Home Forum Links Search Login Register*
    News: Keep The TechnoWorldInc.com Community Clean: Read Guidelines Here.
Recent Updates
[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[February 14, 2024, 02:00:39 PM]
Subscriptions
Get Latest Tech Updates For Free!
Resources
   Travelikers
   Funistan
   PrettyGalz
   Techlap
   FreeThemes
   Videsta
   Glamistan
   BachatMela
   GlamGalz
   Techzug
   Vidsage
   Funzug
   WorldHostInc
   Funfani
   FilmyMama
   Uploaded.Tech
   MegaPixelShop
   Netens
   Funotic
   FreeJobsInc
   FilesPark
Participate in the fastest growing Technical Encyclopedia! This website is 100% Free. Please register or login using the login box above if you have already registered. You will need to be logged in to reply, make new topics and to access all the areas. Registration is free! Click Here To Register.
+ Techno World Inc - The Best Technical Encyclopedia Online! » Forum » THE TECHNO CLUB [ TECHNOWORLDINC.COM ] » Programming Zone » C/C++/C#
 Make System Tray Based Application in .NET
Pages: [1]   Go Down
  Print  
Author Topic: Make System Tray Based Application in .NET  (Read 3214 times)
Taruna
Elite Member
*****



Karma: 13
Offline Offline

Posts: 845

Hi ALL


View Profile
Make System Tray Based Application in .NET
« Posted: December 27, 2006, 01:02:46 AM »


Creating an application that lives in the system tray is easy, but it is not entirely obvious how to do so in Visual Studio. This recipe will show you the steps.

1) First, create a new Windows Application project in Visual Studio.NET. This can be either Visual Basic or C#

2) Drag a Notifyicon control and a ContextMenu control from the toolbox onto the form.

3) Click on the NotifyIcon control that you just added, and set the Icon property to whatever icon you want your application to have.

4) Set the ContextMenu property of the Notifyicon to the context menu that you added to your project.

5) Right click on the Context Menu control, and select Edit. Since this menu will be the right-click menu for your tray icon, you will want to add the items that the user will see. Make sure to add an Exit menu item.

6) Double click the Exit menu item, and add the following code:

Code:
this.Close();

7) Now for the important settings. Click on the form, and go to the Properties window. Set the following settings:

Code:
FormBorderSize: Fixed Tool Window 
WindowState: Minimized
Opacity: 0%
ShowInTaskbar: False

The key thing to remember is that the default form is not to be used for application functionality, it is only used as the hidden background window. If you want to create a new window, you can just add another form to your application.

Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Copyright © 2006-2023 TechnoWorldInc.com. All Rights Reserved. Privacy Policy | Disclaimer
Page created in 0.158 seconds with 24 queries.