Stop windows from appearing as "tasks" from WPF Task Manager C #

I have a program that opens several windows. I used this method to hide them from ALT + TAB. Now I need the new windows to stop showing up on the Tasks tab of the task manager.

I don’t need the process to not appear in the task manager, I just don’t want all the windows opened by my program to be displayed on the task tab.

Here is an image of what I'm trying to get rid of: http://i1096.photobucket.com/albums/g324/thezaza101/Tasklist.jpg

-Thanks

+6
source share
3 answers

Solved by David Heffernan.

In my main window, I added a static window field that refers to my main window.

public static Window main; Public MainWindow() { main = this; } 

In the windows I need to hide from the task manager and ALT + TAB, I made my main window its owner:

 public HiddenWindow() { this.Owner = MainWindow.main; } 

It is really simple, it hides the window from the "tasks" tab in the task manager, and also stops people from ALT + TABing in your program.

+5
source

For WPF, the only way I currently know is to set the window title to string.Empty or set WindowStyle to ToolWindow . Setting ShowInTaskBar to false does not hide your window from the list of applications.

+3
source

I have the same problem (maybe different), here is my code:

 subWindow.hide();//this will hide the subWindow subWindow.show();//if want to show again 

you will not see the window in the task or AlT + TAB after using hide ()

0
source

Source: https://habr.com/ru/post/897969/


All Articles