Home arrow VB.Net arrow Page 6 - Simple VB.NET Notify Icon with Panel Application
VB.NET

Simple VB.NET Notify Icon with Panel Application


Vikrant's article steps you through the process of building your own Notify Icon application, allowing you to run applications from the task tray, using VB.NET.

Author Info:
By: R. Abhiram Vikrant
Rating: 4 stars4 stars4 stars4 stars4 stars / 130
October 05, 2003
TABLE OF CONTENTS:
  1. · Simple VB.NET Notify Icon with Panel Application
  2. · Notify What?
  3. · The Application
  4. · Context Menu
  5. · Let's Get Cookin'!
  6. · The Code

print this article
SEARCH DEVARTICLES

Simple VB.NET Notify Icon with Panel Application - The Code
(Page 6 of 6 )

Public Class Form1 Inherits System.Windows.Forms.Form

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        nfi.Visible = False   'hide the icon when the form loads
        Panel1.Visible = True   ' show olny Panel1 during the start
        Panel2.Visible = False   'hide the panel2 which is now under panel1
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click, pan1.Click
        Me.Visible = True 'make sure that tha form is displayed first if it's been clcik from notify icon
        Panel1.Visible = True ' activate the first panel
        Panel2.Visible = False ' hide the second panel
        nfi.Visible = False
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click, pan2.Click
        Me.Visible = True 'make sure that tha form is displayed first if it's been clcik from notify icon
        Panel1.Visible = False ' activate the first panel
        Panel2.Visible = True ' hide the second panel
        nfi.Visible = False
    End Sub

    Private Sub LinkLabel1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkLabel1.Click
        Me.Visible = False ' hide the form
        nfi.Visible = True ' show the notify icon in the system tray
    End Sub

    Private Sub nfi_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles nfi.DoubleClick
        Me.Visible = True
        nfi.Visible = False
    End Sub

    Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
        Me.Close()
    End Sub

End Class


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus
VB.NET ARTICLES

- MyClass - Implementing Polymorphism in VB.Net
- Building a News Ticker Using VB.Net
- Everything You Wanted to Know About Forms In...
- Building Assemblies with VB.Net
- Simple VB.NET Notify Icon with Panel Applica...
- Regular Expressions in .NET
- String Encryption With Visual Basic .NET
- Deploying Applications in VB.NET: Part 1/2
- Watching Folder Activity in VB.NET
- Creating A Windows Service in VB.NET
- Implementing The Google Web Service In VB.NET
- Migrating to Visual Basic.NET from Visual Ba...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials