0

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!

Miklos Aubert
  • 4,405
  • 2
  • 24
  • 33

1 Answers1

0

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

Soroush Falahati
  • 2,196
  • 1
  • 27
  • 38
  • Unfortunately, neither one of them worked. They work fine under Explorer, but not under a custom shell. I tried the following: WINDOWPLACEMENT wp = new WINDOWPLACEMENT (); GetWindowPlacement (new IntPtr (GetLobbyHandle ()), ref wp); wp.showCmd = SW_MINIMIZE; SetWindowPlacement (new IntPtr (GetLobbyHandle ()), ref wp); ----- AND : SendMessage ((IntPtr) GetLobbyHandle (), WM_SYSCOMMAND, (IntPtr)0xF020, IntPtr.Zero); ---- – user2027200 Jan 31 '13 at 01:41
  • Ignore that! It was an error with the custom shell. What happened was it finished the program therefore there was no shell anymore. So the shell needs to be running forever for this to work. Thank you! – user2027200 Jan 31 '13 at 14:53