Search code examples
c#windows-7windows-shellshowwindow

Custom Shell Fails to run ShowWindow


I am running a custom shell Test.exe instead of Explorer.exe which launches a full screen application when the user logs in. However, that application is unable to execute ShowWindow commands (minimizing or hiding) on itself. It works fine when the default shell is Explorer.exe so it has something to do with the custom shell not having a taskbar possibly?

Is there a way to handle such a case and if so, how would I go about doing it? I would like the ability to minimize a window in a custom shell rather than having explorer running.

Thanks!


Solution

  • Please try SetWindowPlacement too:

    http://msdn.microsoft.com/en-us/library/ms633544%28v=vs.85%29.aspx

    And if nothing happened try to send a syscommend message to window:

    http://msdn.microsoft.com/en-us/library/windows/desktop/ms646360%28v=vs.85%29.aspx

    SC_MINIMIZE is 0xF020 for WM_SYSCOMMAND