需要做什么让你的.NET应用程序显示在窗口的系统托盘中的图标?
What needs to be done to have your .NET application show up in Window's system tray as icon?
和你如何处理mousebutton点击所述图标?
And how do you handle mousebutton clicks on said icon?
首先,添加一个NotifyIcon控件到窗体。随后连线了通知图标做你想做的。
First, add a NotifyIcon control to the form. Then wire up the Notify Icon to do what you want.
如果你想让它隐藏到系统托盘上的减少,试试这个。
If you want it to hide to tray on minimize, try this.
Private Sub frmMain_Resize(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Resize
If Me.WindowState = FormWindowState.Minimized Then
Me.ShowInTaskbar = False
Else
Me.ShowInTaskbar = True
End If
End Sub
Private Sub NotifyIcon1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseClick
Me.WindowState = FormWindowState.Normal
End Sub
我会偶尔使用气球文本,以通知用户 - 这是作为这样
I'll occasionally use the Balloon Text in order to notify a user - that is done as such
Me.NotifyIcon1.ShowBalloonTip(3000, "This is a notification title!!", "This is notification text.", ToolTipIcon.Info)
上一篇:System.Net.Mail和=?UTF-8?B'XXXXX ....标题标题、Mail、Net、System
下一篇:如何频繁的是DateTime.Now更新?还是有更多的precise API来获取当前时间?的是、是有、频繁、时间