VB.NET easy to achieve taskbar programs [less than 10 lines of code]

xiaoxiao2021-03-06  93

VB.NET easy to achieve taskbar programs [less than 10 lines of code]

1. Start the .NET environment, create a new VB.NET's Windows application 2. Add a Notifyicon control on the form to specify a corresponding icon file.

3. Add a ContextMenu to specify the Notifyicon's contextMenu as this contextMenu4. Add two submenus to the ContextMenu, which is "display interface" and "exit" 5. Double-click the "Exit" menu, enter me.dispose (TRUE) 6. Double click "Display" menu, enter me.show () me.focus () 7. Enter E.cancel = true me.hide () in form_closing, run the program, see the effect! Simple architecture is OK, You can also extend, such as: Different situations, display different icons, can be implemented with ImageList and Notifyicon, ^ _ ^ ..

转载请注明原文地址:https://www.9cbs.com/read-105460.html

New Post(0)