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?

Developer technologies | Windows Presentation Foundation
Developer technologies | C#
Developer technologies | 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.
{count} votes

Your answer

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