VB.NET中的NotifyIcon怎么用
1个回答
展开全部
'点击状态栏的图标时显示窗体
Private Sub notifyIcon1_MouseClick(ByVal sender As Object, ByVal e As MouseEventArgs)
If Me.WindowState = FormWindowState.Minimized Then
Me.WindowState = FormWindowState.Normal '还原
End If
Me.Activate()
Me.notifyIcon1.Visible = False
Me.ShowInTaskbar = True
End Sub
'程序关闭时清除状态栏图标
Private Sub 退出ToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs)'关闭应用程序
Me.notifyIcon1.Visible=False
Me.Close()
Application.Exit()
End Sub
Private Sub notifyIcon1_MouseClick(ByVal sender As Object, ByVal e As MouseEventArgs)
If Me.WindowState = FormWindowState.Minimized Then
Me.WindowState = FormWindowState.Normal '还原
End If
Me.Activate()
Me.notifyIcon1.Visible = False
Me.ShowInTaskbar = True
End Sub
'程序关闭时清除状态栏图标
Private Sub 退出ToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs)'关闭应用程序
Me.notifyIcon1.Visible=False
Me.Close()
Application.Exit()
End Sub
网易云信
2023-12-06 广告
2023-12-06 广告
网易云信提供一站式的 1 对 1 UIKit 组件库,可以更快地搭建 1 对 1 社交平台,能够快速实现音视频呼叫、音视频通话、1对1消息发送、美颜和礼物功能,直接可以复用我们的组件源码就可以了。优势:1、全套1对1 UI组件,接入更快;2...
点击进入详情页
本回答由网易云信提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询