Which windows should be shown in Windows taskbar for a program? - wpf

Are there any guidelines to this? WPF windows are shown in taskbar by default. You must excplicitly set them not be shown there by
ShowInTaskbar = False
However it seems that many Microsoft programs seem to have only main window in taskbar.

Please refer to MSDN.
Make the following window types appear on the taskbar (for Windows 7, by using a taskbar button thumbnail):
Primary windows (which includes dialog boxes without owners)
Property sheets
Modeless progress dialog boxes
Wizards
For Windows 7, use taskbar button thumbnails to group the following window types with the primary window taskbar button it was launched from. Each program (specifically, each program perceived as a separate program) should have a single taskbar button.
Secondary windows
Workspace tabs
Project windows
MDI child windows

Related

Single Taskbar icon for all Windows in multi process wpf app ( click once deployed)

I have multi process wpf app : 1 master process + 1or more slave process. All these processes have Windows.
Now I have set icon property of all the windows to xyz.ico.
Also I have set ApplicationIcon property of startup project to xyz.ico.
I am deploying the app through click once.
As per my understanding , setting above two icon property should be enough to make sure all windows of all process appear under single Taskbar icon.
But I am seeing that the windows of mater process appear in a Taskbar icon while all other process's windows appear under a different Taskbar icon.
Any idea what am I missing? Or any other technique to achieve this scenario.
Note: I am NOT launching different application. Theres just one app , that app is launching The different processes.
answer: finally we sorted this out using the appUserModelID shell32 APIs. It did work even with click once being used.

A window with no taskbar icon, no appearance in Alt-Tab and *without* using the ToolWindow extended style

I have a problem that appears to be new to Windows 10.
I want to create a form that is visible to the user, but with no task bar icon and that does not appear in Alt+Tab.
This is perfectly doable if one is happy to sacrifice the normal styling of a window by following the accepted solutions here for either WPF or Windows Forms.
The general advice for both WPF and Windows Forms is:
Set ShowInTaskbar to false
Enable the ToolWindow styling (either through setting the border style in WinForms or the WindowStyle in WPF)
However, this has a new, practical problem in Windows 10 when using Virtual Desktops: the moment you do the above, the WPF or WinForms window will appear in every virtual desktop. See my example application with a red background:
This affects both the Task View switching screen and the actual desktop itself. No matter where you go, the form is there!
Is there any way to show a form - or even just a bitmap - on Windows without anything appearing in the taskbar, without anything appearing in Alt+Tab and without duplicating the window on every virtual desktop?
I have spent two days researching every possible option, trying every example online, reading MSDN documentation on window styles etc. but all resort to the same method, either through P/Invoke calls or directly, but either way the result is the same.

How to detect which Window was selected when using Aero peek

I am not even sure how to ask this question...
I have a WPF app with a main window in full screen. It launches new windows in full screen and makes them a child of the main window upon some user interactions. If the user's machine only has a single monitor this child window is supposed to be the focus until closed. However, I have found that using Windows Aero if the user hovers over my application's taskbar icon a preview of both windows appear. This in itself is not an issue except if you try to select the main window of the app nothing happens because the child window is always on top but the peek functionality gives the illusion that the user can switch to the main window and it looks like a bug.
I would like to detect which window the user is selecting and, if it is the main window, simply close the child window. Alternatively I would like Aero to stop showing multiple windows if only one will work.
Anyone had any experience with this?

How to show VB application ONLY in system tray

Is it possible that we can show application only in system tray(the tray at bottom right of screen) instead of , as normally application opens in bottom bar ? If yes then how can we do it in Visual Basic 2010 .
There is a showInTaskbar property you can set to false on your windows form. Moreover you can set Visible to false.
In your Designer you can add a notifyIcon to your form, this is the typical tray icon you are searching for.

Prevent WPF Window From Minimizing (Winkey + D, mostly)

I have a window which is supposed to act like a Windows Vista(+) gadget; its supposed to stay on the desktop, not to appear on taskbar and the alt+tab menu, but most importantly, not to get minimized.
Here is its header:
As its style is set to None, it has no control buttons (minimize, close, etc...) but it still can be minimized using the "Show Desktop" feature and the Winkey+D combination.
How can I prevent that from happening?
Thanks!
"Show Desktop" does more than just minimize windows - after minimizing all the windows it can, it then brings the desktop window to the top of the z-order. Raymond Chen has a good explanation of this.
You could mark your window as "always on top" but then it would appear on top of every window. I can't think of any other way of preventing Show Desktop from hiding your window. A quick experiment with Windows Sidebar shows that it is also minimized on Show Desktop unless you set the "Sidebar is always on top of other windows".

Resources