utility that can hide a taskbar button, but leave the window as-is?


Recommended Posts

I run a to-do list app all the time, just leave it open in the background. Is there any way to hide the button in the taskbar, but leave the program's window open?

I've found a couple freebie utilities that can move the button to the tray, but they also minimize the window.

Anyone know of such a thing?

A taskbar button is directly linked to the window. The window needs to specify the property not to have a taskbar button to hide it, and I don't believe the WinAPI has a function to force this or do it for a window not owned by your thread.

A taskbar button is directly linked to the window. The window needs to specify the property not to have a taskbar button to hide it, and I don't believe the WinAPI has a function to force this or do it for a window not owned by your thread.

Thanks.

This code might be of some help. What it does is sets the window style of a given application to a tool window instead of an app window. The point of this is that windows with the param "WS_EX_TOOLWINDOW" are made to be hidden from the task bar. The problem is that this code doesn't work unless you can execute it on form activation (or initialization of the target window).

I'm not sure if there is another way to hide it or if you'd have to somehow inject/subclass the processes initialization process.

Winapi functions and defined constants for C#:

 [DllImport("user32.dll")]
		static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);

 [DllImport("user32.dll")]
		private static extern int GetWindowLong(IntPtr hWnd, int nIndex);

		private const int GWL_EXSTYLE = (-20);
		private const int WS_EX_TOOLWINDOW = 0x80;
		private const int WS_EX_APPWINDOW = 0x40000;

Function to detect process and set information:

 Process[] processes = Process.GetProcessesByName("yourProcessHere");

			foreach (Process p in processes)
			{

				IntPtr pWindow = p.MainWindowHandle;

				SetWindowLong(pWindow, GWL_EXSTYLE, (GetWindowLong(pWindow,
GWL_EXSTYLE) | WS_EX_TOOLWINDOW) & ~WS_EX_APPWINDOW);

			}

I'll see if I can dig anything else up.

Edit: According to this (http://vcfaq.mvps.org/mfc/4.htm) it may be possible to hide the button from the taskbar by the following:

The best method is to make the application's top level window have a parent window that is invisible.

So it may be possible with some code to create a parent window for that app that is invisible. I've never done that before so I'd have to look into it.

Edit #2: Tested it out and I was able to create a MDI form in C# and use the following API:

		[DllImport("user32.dll")]
		private static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);

I was able to set the parent window for notepad to the app I made and effectively remove the button from the task bar. There is another problem though -- I can't figure out how to make the parent window invisible/transparent without making the child window(s) invisible as well. If either problem could be solved then it'd be fairly easy to make an app for you that would do as you want.

Edited by dlegend

an out of the box solution would be to find and use a widget that's a to do list. cause widgets don't spear in your task bar and as long as you have only a few of them they won't take up that much ram. if you have vista it's already there of course and i am sure you can google it to find an easy solution for xp.

I just came up with a neat programming solution (in C#) to address this problem. It utilizes both methods I mentioned above and works flawlessly (with the exception of a quick flicker of the window). To do this you'll first need to create a MDI form and then use the following:

Namespaces

using System.Runtime.InteropServices;
using System.Diagnostics;

DLL Function Imports

		[DllImport("user32.dll")]
		static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);

		[DllImport("user32.dll")]
		private static extern int GetWindowLong(IntPtr hWnd, int nIndex);

		[DllImport("user32.dll")]
		private static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);

Constants

		private const int GWL_EXSTYLE = (-20);
		private const int WS_EX_TOOLWINDOW = 0x80;
		private const int WS_EX_APPWINDOW = 0x40000;

Main Function

Process[] processes = Process.GetProcessesByName("processNameHere");

			foreach (Process p in processes)
			{
				IntPtr pWindow = p.MainWindowHandle; 

				int iWindowStyle = GetWindowLong(pWindow, GWL_EXSTYLE); 

				SetParent(pWindow, this.Handle);
				SetWindowLong(pWindow, GWL_EXSTYLE, (iWindowStyle | WS_EX_TOOLWINDOW) & ~WS_EX_APPWINDOW);
				SetParent(pWindow, (IntPtr)0);
				SetWindowLong(pWindow, GWL_EXSTYLE, iWindowStyle);
			}

What the main function does is find the process's main window, gets the extended window style, makes the window a child of our app, sets the extended window style to become a tool window, sets child windows parent back to the desktop, and reapplies its original extended window style back.

As described earlier, just setting the extended window style itself wasn't enough -- it was only able to work correctly upon initialization of the window. By creating a parent window and setting the extended window style and by then setting the parent window back to the desktop, it updates the extended window style without having to be done through form/window initialization.

Now if you could link me to the to-do list app your having problems with, I can probably customize the code to work specifically for it.

an out of the box solution would be to find and use a widget that's a to do list. cause widgets don't spear in your task bar and as long as you have only a few of them they won't take up that much ram. if you have vista it's already there of course and i am sure you can google it to find an easy solution for xp.

Yes the app I've used in the past is called Post It Digital Notes, and by design it doesn't create a taskbar button. But it's very limited connectivity wise and that's why I started using this new one.

I just came up with a neat programming solution (in C#) to address this problem. It utilizes both methods I mentioned above and works flawlessly (with the exception of a quick flicker of the window). To do this you'll first need to create a MDI form and then use the following:

Namespaces

using System.Runtime.InteropServices;
using System.Diagnostics;

DLL Function Imports

		[DllImport("user32.dll")]
		static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);

		[DllImport("user32.dll")]
		private static extern int GetWindowLong(IntPtr hWnd, int nIndex);

		[DllImport("user32.dll")]
		private static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);

Constants

		private const int GWL_EXSTYLE = (-20);
		private const int WS_EX_TOOLWINDOW = 0x80;
		private const int WS_EX_APPWINDOW = 0x40000;

Main Function

Process[] processes = Process.GetProcessesByName("processNameHere");

			foreach (Process p in processes)
			{
				IntPtr pWindow = p.MainWindowHandle; 

				int iWindowStyle = GetWindowLong(pWindow, GWL_EXSTYLE); 

				SetParent(pWindow, this.Handle);
				SetWindowLong(pWindow, GWL_EXSTYLE, (iWindowStyle | WS_EX_TOOLWINDOW) & ~WS_EX_APPWINDOW);
				SetParent(pWindow, (IntPtr)0);
				SetWindowLong(pWindow, GWL_EXSTYLE, iWindowStyle);
			}

What the main function does is find the process's main window, gets the extended window style, makes the window a child of our app, sets the extended window style to become a tool window, sets child windows parent back to the desktop, and reapplies its original extended window style back.

As described earlier, just setting the extended window style itself wasn't enough -- it was only able to work correctly upon initialization of the window. By creating a parent window and setting the extended window style and by then setting the parent window back to the desktop, it updates the extended window style without having to be done through form/window initialization.

Now if you could link me to the to-do list app your having problems with, I can probably customize the code to work specifically for it.

The application is called Evernote, the free version (www.evernote.com). I really don't want to put you out in custom-creating this, though I'd certainly be grateful if you do--there's no way I can make an "MDI form" and make use of the code you've provided.

Have you tried Tray It? Install and run Tray It, then right click the app and select "Place in system tray", then double click it/right click and select Edit Profile. In the Tray It Minimizing Option dialog, go to More tab, Hide application from the taskbar all the time, only keep tray icon. Then use Windows's built in notification area settings to hide the tray icon.

Have you tried Tray It? Install and run Tray It, then right click the app and select "Place in system tray", then double click it/right click and select Edit Profile. In the Tray It Minimizing Option dialog, go to More tab, Hide application from the taskbar all the time, only keep tray icon. Then use Windows's built in notification area settings to hide the tray icon.

That is exactly what I'd been looking for. Tested it and it works great. Thanks much!

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • This sounds like underneath the nice marketing spin, either someone at Adobe got tired of their lazy devs and asked Microsoft to train them to help sort Adobe's old spaghetti code to make it go faster, or Microsoft wanted Adobe's crap to run better on Windows to make it look better against Apple, so they offered to intervene. Either way, GOOD.
    • My favorite file manager for Windows 11 finally gets a long-requested feature by Taras Buria Files is among the best File Explorer alternatives for Windows 10 and 11. This free app is packed with all sorts of features and conveniences, but there is one crucial feature that is still missing—Tree View. Fortunately, the latest update in the Preview channel finally delivers it. With version 4.1.4, which is now available for download in the Preview channel, developers implemented Tree View, a new mode that displays folders in an expandable hierarchy. Windows 11's stock File Explorer always had this feature, but it was nowhere to be found in Files until now. Starting with the latest preview update, you can expand each drive and its nested folders without leaving the current location and then open the folder you need in the main view. To try Tree View in Files, update the app to the latest preview version, then click the small arrow next to a drive to expand its content. The developers say they are rolling out Tree View in Preview first to gather feedback from users and improve the feature before bringing it to all in the stable channel. In addition to Tree View, Files 4.1.14 improves the Windows Fonts folder. You can now preview each font directly in Files with no need to open the built-in font viewer. For now, these two features are only available in the Preview channel. For those using the stable release, developers recently released version 4.1.3, with improvements for the built-in tag system, on-demand folder size calculation, and plenty of various fixes. You can check out the full release notes here. You can download Files from the Microsoft Store (paid version) or its official website (free).
    • Who is paying for this 30x scale-up? Its sounds expensive.
    • Millions of users to benefit from Windows 11's new performance boost on Adobe Photoshop by Sayan Sen Despite the advent of AI-generated imagery, Adobe's Photoshop remains one of the most popular tools on this planet. Adobe does not have a publicly reported total user count but it's probably not wrong to assume there are millions. As of 2025, Adobe Creative Cloud has had approximately 41 million paid subscribers, many of whom likely use Photoshop. In addition, more than 166,000 companies worldwide are apparently also using the app. These figures are according to a very recent report by SQ Magazine. Out of them, it is fair to assume that many are probably running Windows. As such, there is good news for these users as Microsoft has announced Photoshop is getting a big 20% performance boost on x86-64 (AMD64) systems and a 13% bump-up on Arm devices. This is definitely great news for them as many have complained about the slow performance and general sluggishness of Photoshop on Windows 11 ever since the advent of the latter back in 2021. If you are wondering how Microsoft managed to do this, the answer lies in a combination of compiler-level optimizations and a technology called Sample Profile Guided Optimization (SPGO). According to Microsoft, Adobe worked closely with the company’s Visual C++ team and adopted the latest MSVC toolchain enhancements together with SPGO to squeeze more performance out of Photoshop’s CPU-bound workloads. Unlike traditional Profile Guided Optimization (PGO), which requires developers to create special instrumented builds and run lengthy training workloads, SPGO gathers performance data directly from optimized release binaries. This means Adobe could collect real-world usage information which gives a major advantage to this technique, as companies could leverage data collected from actual customer workloads rather than only relying on synthetic benchmark runs. In theory, this should allow optimizations to better reflect how users interact with software in the real world. Thanks to this, there are improvements to code layout, function inlining, hot-and-cold code separation, and other low-level tweaks that help processors execute instructions more efficiently. Essentially the compiler is better able to identify “hot” code paths, those which are most frequently executed, and optimize them accordingly.
    • "The 2TB Samsung 990 PRO NVMe SSD hits lowest price in over three months¨ I'd prefer to see the lowest price in over a year
  • Recent Achievements

    • First Post
      Jocimo earned a badge
      First Post
    • Week One Done
      suprememobiles48 earned a badge
      Week One Done
    • One Month Later
      Windows Guy earned a badge
      One Month Later
    • One Month Later
      Prasann earned a badge
      One Month Later
    • Week One Done
      Prasann earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      521
    2. 2
      +Edouard
      174
    3. 3
      PsYcHoKiLLa
      90
    4. 4
      Steven P.
      81
    5. 5
      ATLien_0
      70
  • Tell a friend

    Love Neowin? Tell a friend!