How to switch from Metro to Desktop

Hi,

How to check if the Metro interface is running in foreground on Win_8 and how to switch into desktop mode ?

I need My application to run in desktop mode because certain functions can't work while Metro is in foreground.

I want to use a simple switch to desktop before my function is called:

1
2
3
4
5
if (metro == 1) then
   switch2desktop();
endif

myfunc();


another problem is that user can tap "windows" button and My func will crash so it would be nice if there is a function/method to block Metro.

btw. simple sending "Windows+d" isn't working.
Last edited on
The 'Metro UI' is also called the 'Start Screen' or 'Launcher'. It can be tested for by calling IAppVisibility::IsLauncherVisible. This COM interface is available in the Windows 8 SDK.

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

So I know how to check if it's "on", but how to switch into desktop mode ?
Turning Metro UI off per-user:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RPEnabled set to 0
Then log off and back in.

Then for the rest of the system, login UI, etc:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\RPEnabled set to 0
Restart.

Please note that I do not test these myself, so I don't know if it works or not.
RPEnabled works only on windows 8 preview.

Thanks for Your time.
Topic archived. No new replies allowed.