Not logged in, Join Here! or Log In Below:  
News Articles Search    

 Home / General Programming / Removing app from alt-tab chain Account Manager
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

March 08, 2005, 04:56 AM

Is that possible on XP?.. I dont want to disable alt-tab, I just dont want my program to show up on the alt-tab list.

I want it to be invisible to the user sort of.. (No its not a virus I'm doing).

Any ideas?


March 08, 2005, 07:15 AM

Try this:


This will naturally hide the window. But it does this in the alt-tab list as well...


March 08, 2005, 08:02 AM

Close but no cigar :) , it hides the window, but it still shows up on the alt-tab list.. Atleast for me. But alt tabing to it doesn't make it visible, thats ok!.

Is there a way to convert an exe process to a service?.. There was a function on win9x but not availibly on xp. If it was a service it wouldn't show up on the alt-tab list I guess.

Rui Martins

March 08, 2005, 08:46 AM

I believe that you can create a process without any window attached to it, i.e, a dummy window that doesn't exist, since I believe the ,indowId must exist, at least in Windows.

Check for specific features of applications like the ones on System Tray. They show up on Task Manager as processes, but don't show up as application windows (Alt-Tab).


March 08, 2005, 08:52 AM

Do Tool Windows show up in under ALT-TAB? If I remember correctly they don't...


March 08, 2005, 10:05 AM

Dont use a NULL window as parent. First create a dummy window from STATIC class. Then use this as the parent window of your application. There are probably more elegant ways tho.


March 08, 2005, 10:06 AM

Set the title of your window as an empty string. SetWindowText(myHwnd, "");

This way, it doesn't even show up as an active running application in your taskmanager. (It does still show in the process list)

My guess is that it is un-tabbable then too.



March 08, 2005, 04:42 PM

Check the windows styles of all the top level windows you create.
As mentioned before WS_TOOLWINDOW and WS_POPUP styles do not appear in the tab-list, of the top of my head. Check the msdn for more info.


March 09, 2005, 02:16 AM

Putting the app in the system tray has worked best so far.. But then I have an icon there obviously. Didn't help to set the trayicon handle to 0 either, a blank space appeared. Other than that it worked as I liked. (Not in alt-tab list and no button on the task bar.)

I could alt-tab to a WS_POPUP style window. I belive most fullscreen app uses WS_POPUP and you can alt-tab to them cant you?.. WS_TOOLWINDOW wasn't recognized in Delphi wich I use.

Haven't tried the dummy window approach yet.

Thanks a bunch all for your efforts!

Rui Martins

March 09, 2005, 05:52 AM

... (No its not a virus I'm doing).

I just got curious, what are you doing ? 8)


March 09, 2005, 10:58 AM

I'm quite sure my method works perfect and you don't need to put an icon in the system tray.

just set the windows title to an empty string(SetWindowText(myHwnd, "");), and of course hide the window (SW_HIDE).

thats all... your app will be unfindable!



March 09, 2005, 02:47 PM

FYI, the toolwindow flag is WS_EX_TOOLWINDOW, and must be passed to the first parameter of CreateWindowEx (it's not a standard window style).


March 10, 2005, 09:36 AM

Oh, Ok.. I found a way now wich works for me, I have a window wich I just close but I dont exit the program.. Problem solved. Maybe its a Delphi thing.

Thanks all!, always amazing how much people know here! :)


April 05, 2005, 01:54 PM

This will remove a window from Alt+Tab, the System Taskbar, and the application list of Windows Task Manager. It will still show up in the process list.

  1. ShowWindow (hWnd, SW_MINIMIZE);
  2. CWnd::ModifyStyleEx (hWnd, NULL, WS_EX_APPWINDOW, NULL);

The second line is only needed for some uses.
Alex Gibbs

This thread contains 14 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.