VB
发布时间:2022-04-03 发布网站:大佬教程 code.js-code.com
大佬教程收集整理的这篇文章主要介绍了[VB.NET]如何将图标放在系统托盘上,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
如何将图标放在系统托盘上 如何将图标放在系统托盘上? 及单击最小化到系统托盘上,再单击系统托盘上的图标弹出窗体界面,请大虾指教,谢谢 __________________________________________________________________________ 看这里吧,写得很清楚。
http://hi
.baidu.com/winlt/blog/item/99056d277a390a03908f9d64.html __________________________________________________________________________ 加入一个NotifyIcon控件,然后 Dim
BoolClose As
Boolean =
false Private Sub Form1_FormClosed(ByVal sender As Ob
ject,ByVal e As Syste
m.Window
s.Form
s.FormClosedEventArgs) Handles Me.FormClosed NotifyIcon1.Visible =
false End Sub '' 点击关闭时最小化到System Tray,而
不关闭 Private Sub Form1_FormClosing(ByVal sender As Ob
ject,ByVal e As Syste
m.Window
s.Form
s.FormClosingEventArgs) Handles Me.FormClosing If
BoolClose =
false Then e.Cancel = True Me.Visible =
false NotifyIcon1.Visible = True End If End Sub '' 点击System Tray图标时显示主窗体 Private Sub NotifyIcon1_MouseClick(ByVal sender As Ob
ject,ByVal e As Syste
m.Window
s.Form
s.MouseEventArgs) Handles NotifyIcon1.MouseClick If e
.button = Window
s.Form
s.MouseButton
s.Left Then Me.Visible = True NotifyIcon1.Visible =
false End If End Sub __________________________________________________________________________ 这样会退不出程序,要在菜单中和NotifyIcon的右键菜单中加入令
BoolClose为真然后关闭窗口的的项,使程序可以退出。 __________________________________________________________________________ 好的,谢谢各位,成功了 __________________________________________________________________________
大佬总结
以上是大佬教程为你收集整理的[VB.NET]如何将图标放在系统托盘上全部内容,希望文章能够帮你解决[VB.NET]如何将图标放在系统托盘上所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。