关闭窗体最小化到任务栏
1
Protected Overrides Sub OnClosing(ByVal e As System.ComponentModel.CancelEventArgs)
2
' Me.ShowInTaskbar = False
3
Me.WindowState = FormWindowState.Minimized
4
e.Cancel = True
5
End Sub 'OnClosing
6
7
8
9
Private Sub frmWarning_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize
10
If Me.WindowState = FormWindowState.Minimized Then
11
Me.NotifyIcon2.Text = "工作提醒( " & Microsoft.VisualBasic.Left(company_name, 4) & ")"
12
Me.ShowInTaskbar = False
13
Me.NotifyIcon2.Visible = True
14
Me.Hide()
15
End If
16
End Sub
17
Protected Overrides Sub OnClosing(ByVal e As System.ComponentModel.CancelEventArgs)2
' Me.ShowInTaskbar = False3
Me.WindowState = FormWindowState.Minimized4
e.Cancel = True5
End Sub 'OnClosing6

7
8

9
Private Sub frmWarning_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize10
If Me.WindowState = FormWindowState.Minimized Then11
Me.NotifyIcon2.Text = "工作提醒( " & Microsoft.VisualBasic.Left(company_name, 4) & ")"12
Me.ShowInTaskbar = False13
Me.NotifyIcon2.Visible = True14
Me.Hide()15
End If16
End Sub17


浙公网安备 33010602011771号