Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide a taskbar entry but keep the window form?

I'd like to hide the taskbar entry to maximize effective space since the app has a systray icon, i dont need the taskbar entry. The app doesnt allow you to only have a systray instead of both.

How can I hide a taskbar entry but keep the window form?

like image 405
FLX Avatar asked Oct 12 '09 10:10

FLX


2 Answers

Following is for MSVC:

if (bShow)
    ModifyStyleEx(0, WS_EX_APPWINDOW);
else
    ModifyStyleEx(WS_EX_APPWINDOW, 0);

ModifyStyleEx documentation is here.

Links:

  • How To Hide A Window in TaskBar.
  • How to dynamically show/hide the Taskbar application button.
like image 28
Andrejs Cainikovs Avatar answered Sep 30 '22 04:09

Andrejs Cainikovs


In what language is your application written?

The API call you want is called SetWindowLong.

Example Delphi code would be:

procedure TForm1.FormCreate(Sender: TObject);
begin
  ShowWindow(Application.Handle, SW_HIDE);

  SetWindowLong(Application.Handle, GWL_EXSTYLE,
          GetWindowLong(Application.Handle, GWL_EXSTYLE) or WS_EX_TOOLWINDOW);

  ShowWindow(Application.Handle, SW_SHOW);
end;
like image 115
JosephStyons Avatar answered Sep 30 '22 05:09

JosephStyons