Window shown in alt tab menu even included tool window style

phongla 0 Reputation points
2024-11-15T06:00:15.93+00:00

I am working with wpf application that create a transparent, topmost window. I also set tool window style for my window by using: SetWindowLong(hwnd, GWL_EXSTYLE, extendedStyle | WS_EX_TOOLWINDOW). It is ok during application running but when I go to Task Manager (Details tab) and "End task" the explorer.exe then start it again by clicking run new task, my application's windows will be shown in alt tab area even it still include ToolWindow style normally (I checked by Spy++).

One more important note that I cannot reproduce that issue if run application directly but if I use a service to start the application with UI access token (SetTokenInformation(hUserToken, TOKEN_INFORMATION_CLASS.TokenUIAccess, ref dwUIAccess, sizeof(uint))) . I can reproduce the issue. Can anyone help me to explain the reason?

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,788 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,054 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.