Delphi Hide program icon in taskbar

Source: Internet
Author: User

Delphi Hide program icon in taskbar

Method One:
1, modify the project document "Application.mainformontaskbar: = True;" To "application.mainformontaskbar: = False;"
2. Write down the OnShow event in the main form: ShowWindow (Application.handle, sw_hide);

Method Two:
Change the form style SetWindowLong (Self.handle,gwl_exstyle,ws_ex_toolwindow);

----------------------------------------------------------------------------------------

This program does not display mstasklistwclass in the taskbar
proceduretform1.formshow (sender:tobject);beginShowWindow (application.handle,sw_hide);End;procedureTform1.button1click (sender:tobject);beginShowWindow (Application.handle, sw_hide);//hide icons in taskbarSetWindowLong (Application.handle, Gwl_exstyle, GetWindowLong (Application.handle, Gwl_exstyle)orWs_ex_toolwindow and  notWs_ex_appwindow);End; ShowWindow (FindWindow ('Form2'), sw_hide);//Hide FormShowWindow (Form2.handle,sw_hide);//Hide FormShowWindow (Self.handle,sw_hide);//Hide FormShowWindow (FindWindow ('Form2'), Sw_normal);//Show FormShowWindow (Form2.handle,sw_normal);//Show FormShowWindow (Self.handle,sw_normal);//Show FormShowWindow (application.handle,sw_hide);//hide the icon in the taskbar {This sentence does not show the effect in Formcreate}ShowWindow (Application.handle,sw_normal);//show icons in the taskbarSetWindowPos (Application.handle,hwnd_top,0,0,0,0, Swp_hidewindow);//does not appear in the system bar

Reference: http://www.cnblogs.com/xe2011/archive/2012/06/02/2531604.html

Delphi Hide program icon in taskbar

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.