6

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?

xdhmoore
  • 8,935
  • 11
  • 47
  • 90
FLX
  • 4,634
  • 14
  • 47
  • 60
  • 2
    For what framework? Some provide a property for this (C# windows forms has a ShowInTaskbar property on the Form object) – rslite Oct 12 '09 at 11:11
  • ShowInTaskbar came to mind first time I read the question. Then I realized it might not be a programming question. Anyway, +1 – tzup Oct 12 '09 at 11:17
  • 1
    This is not programming related. The OP just wants to hide the taskbar entry of a generic program, not a self-written one. http://superuser.com/questions/54284/how-to-hide-a-taskbar-entry-but-keep-the-window-form – Sasha Chedygov Oct 15 '09 at 04:12
  • for windows application which is able to do this see: http://superuser.com/questions/54284/how-to-hide-a-taskbar-entry-but-keep-the-window-form/341455#341455 – c33s Sep 30 '11 at 00:46
  • I was having the same issue except for I wanted to do so in my code. Tnx to u guys esp @rslite. – Fatima Sep 01 '12 at 09:46

3 Answers3

6

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
  • 57,317
  • 63
  • 160
  • 234
2

Following is for MSVC:

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

ModifyStyleEx documentation is here.

Links:

Andrejs Cainikovs
  • 27,428
  • 2
  • 75
  • 95
  • Oops, i didn't mean programming code but an actual program. Thanks for the suggestions though! – FLX Oct 12 '09 at 13:33
  • 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 Oct 12 '09 at 13:38
1

.NET

Solution for C# would be:

ShowInTaskbar = false;

Solution for VB.NET would be:

ShowInTaskbar = False
Community
  • 1
  • 1
awe
  • 21,938
  • 6
  • 78
  • 91
  • Shouldn't you also read the comments before posting? rslite had already answered for .Net – tzup Oct 12 '09 at 11:21
  • 2
    @tzup: rslite should have made his comment an answer. @awe: it might help to mention that `ShowInTaskbar` is a `Form` method. – MusiGenesis Oct 12 '09 at 11:49