运行图
代码
记得在工具栏中加载NotifyIcon1组件!
Imports System.ComponentModel
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
NotifyIcon1.Icon = Me.Icon '将 NotifyIcon 的图标设置为窗体的图标
NotifyIcon1.ContextMenuStrip = ContextMenuStrip1 '将 ContextMenuStrip 关联到 NotifyIcon
NotifyIcon1.Visible = True '显示 NotifyIcon
End Sub
End Class