To show and hide the system tray class

Source: Internet
Author: User

1   Public Static classWintask2     {3         Private Const intSw_hide =0;//API parameters represent hidden Windows4         Private Const intSw_show =5;//The API parameter indicates that the window is displayed with the current size and position5 6[DllImport ("user32.dll")]7         Private Static extern intFindWindow (stringClassName,stringwindowname);8[DllImport ("user32.dll")]9         Private Static extern intShowWindow (intHandleintcmdshow);Ten        /// <summary> One        ///Show A        /// </summary> -          Public Static voidShowtaskbar () -         { theShowWindow (FindWindow ("Shell_traywnd",NULL), sw_show); -         } -        /// <summary> -        ///Hidden +        /// </summary> -          Public Static voidHidetaskbar () +         { AShowWindow (FindWindow ("Shell_traywnd",NULL), sw_hide); at         } -}
View Code

After this, the taskbar is hidden, but the start button is still there, the solution is to set the taskbar to automatically hide it.

Show and hide the system tray class

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.