首先,在窗体中添加一个NotifyIcon控件。然后连接通知图标来做你想要的。
原文链接:https://www.f2er.com/windows/373152.html如果您希望将其最小化隐藏到托盘,请尝试这样做。
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
Me.NotifyIcon1.ShowBalloonTip(3000,"This is a notification title!!","This is notification text.",ToolTipIcon.Info)