Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 

How to Show Icon of your Application in System Tray

Author: DevASP
Download Source Code : 368_System_tray_icon.zip

In this simple article you will learn that how can you show icon of your application in system tray.

Create a New Project in VB.Net. Drag a Notify Icon control and two buttons from tool box and place on form.

 

Now go to Fileà Add New Items now add new icon file from this and design as you want to design.

 

Now go to form1 properties and select icon here which you have created before.

 

Now write code on form load event of the form and some other events as follows

 

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

 

        Me.Button1.Text = "SHOW TRAY ICON"

        Me.Button2.Text = "HIDE TRAY ICON"

        Me.NotifyIcon1.Icon = Me.Icon

        Me.NotifyIcon1.Visible = False

 

End Sub

 

Now write code on button click even

 

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

       

        Me.NotifyIcon1.Visible = True

 

End Sub

 

 

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

 

        Me.NotifyIcon1.Visible = False

 

End Sub

   
Add Article Comment:
Name :
Email Address :
   
Comments :
 
   
<< Working with Tool Tip Control in VB.Net

Disclaimer - Privacy
© 2002-2017 DevASP.net