views:

430

answers:

3

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?

Thanks,

Dennis

A: 

Following is for MSVC:

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

ModifyStyleEx documentation is here.

Links:

Andrejs Cainikovs
Oops, i didn't mean programming code but an actual program. Thanks for the suggestions though!
FLX
This site is for programming questions. If you are searching for a handy tool, ask the same question on superuser.com. Hope this helps.
Andrejs Cainikovs
+2  A: 

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;
JosephStyons
A: 

.NET

Solution for C# would be:

ShowInTaskbar = false;

Solution for VB.NET would be:

ShowInTaskbar = False
awe
Shouldn't you also read the comments before posting? rslite had already answered for .Net
tzup
@tzup: rslite should have made his comment an answer. @awe: it might help to mention that `ShowInTaskbar` is a `Form` method.
MusiGenesis