#Region"對 System Tray 按左鍵功能選單" '對 System Tray 按左鍵視窗正常化 PrivateSub notifyIcon1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles notifyIcon1.MouseDown If e.Button = MouseButtons.Left Then Me.Show() Me.WindowState = FormWindowState.Normal EndIf EndSub #End Region #Region"對 System Tray 按右鍵功能選單" '關閉應用程式 PrivateSub toolStripMenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toolStripMenuItem2.Click Me.Dispose() EndSub '最大化 PrivateSub toolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toolStripMenuItem1.Click Me.Show() Me.WindowState = FormWindowState.Maximized Me.notifyIcon1.Visible = False EndSub #End Region