Program 1. Start the. NET environment and create a new VB. NET of Windows applications
2. Add a NotifyIcon control on the form, specify a corresponding icon file, instance diagram:
3. Add a ContextMenu and assign the NotifyIcon ContextMenu as this ContextMenu
4. Add two submenus to ContextMenu, respectively "Display interface" and "exit", as shown in figure:
5. Double-click the "Exit" menu and enter Me.dispose (True)
6. Double-click the "Show" menu and enter
Me.Show ()
Me.focus ()
7. In the FORM of the form_closing input
E.cancel = True
Me.hide ()
8. Run the program, see the effect!
Simple architecture So OK, you can also expand, such as: different situations, display different icons, can be achieved through IMAGELIST and NOTIFYICON combination, ^_^.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.