FLX
FLX

Reputation: 4714

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?

Upvotes: 6

Views: 6995

Answers (3)

awe
awe

Reputation: 22462

.NET

Solution for C# would be:

ShowInTaskbar = false;

Solution for VB.NET would be:

ShowInTaskbar = False

Upvotes: 1

Andrejs Cainikovs
Andrejs Cainikovs

Reputation: 28474

Following is for MSVC:

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

ModifyStyleEx documentation is here.

Links:

Upvotes: 2

JosephStyons
JosephStyons

Reputation: 58775

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;

Upvotes: 6

Related Questions