i built a small app in vb.net and i would like my icon to appear next to the computer clock in the taskbar. how can i do this?
我在vb.net中构建了一个小应用程序,我希望我的图标出现在任务栏中的计算机时钟旁边。我怎样才能做到这一点?
1 个解决方案
#1
You should add a NotifyIcon
component to your form. Assign an icon to its Icon
property, and set its Visible
property to true
, and it should appear next to the clock. You can use the various mouse events of the component to let the user interact with it, or you can assign a context menu to it.
您应该向表单添加NotifyIcon组件。为其Icon属性指定一个图标,并将其Visible属性设置为true,它应显示在时钟旁边。您可以使用组件的各种鼠标事件让用户与其进行交互,也可以为其分配上下文菜单。
#1
You should add a NotifyIcon
component to your form. Assign an icon to its Icon
property, and set its Visible
property to true
, and it should appear next to the clock. You can use the various mouse events of the component to let the user interact with it, or you can assign a context menu to it.
您应该向表单添加NotifyIcon组件。为其Icon属性指定一个图标,并将其Visible属性设置为true,它应显示在时钟旁边。您可以使用组件的各种鼠标事件让用户与其进行交互,也可以为其分配上下文菜单。