Imports System.Windows.Forms.NotifyIcon
Imports System.Windows.Forms
Public Class Form2
Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick
Me.Show()
Me.WindowState = FormWindowState.Normal
NotifyIcon1.Visible = False
End Sub
Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
Dim f As Form = sender
If f.WindowState = FormWindowState.Minimized Then
NotifyIcon1.Visible = True
NotifyIcon1.ShowBalloonTip(200, "Emai_Marketing", "ProsoftCreate_Chiang Mai", ToolTipIcon.Info)
Me.Hide()
End If
End Sub
Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click
MsgBox("open")
End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
Application.Exit()
End Sub
End Class
Tag : .NET, Ms SQL Server 2008, Win (Windows App), VB.NET
Public Class Form2
Private Sub Form1_Resize(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Resize
If WindowState = FormWindowState.Minimized Then
NotifyIcon1.Visible = True
Me.Hide()
End If
End Sub
End Class