locked
Metro UI window class RRS feed

  • Question

  • How can I find out programmatically that I am currently on the Metro UI start screen? Does it have a window class name that I can check to see if it is the foreground window?
    Thursday, October 27, 2011 10:27 PM

Answers

  • We can close this thread. I already know the answer.
    • Marked as answer by Vadim Klishko Friday, November 4, 2011 4:27 PM
    Friday, November 4, 2011 4:26 PM

All replies

  • This thread was created in the Windows Developer Preview: General OS forum; the Microsoft Moderation team has moved this thread to the UI Design for Metro style Apps forum.

    Thanks,
    Marilyn
    Friday, October 28, 2011 2:22 AM
  • There is no supported way to do this, and applications shouldn't need to care about this.  The application should treat its window being covered by the start screen the same as it would treat its window being covered by any other window.

    --Rob

    Friday, October 28, 2011 4:03 AM
  • There is no supported way to do this...


    Is there an unsupported way to do this? 

    ... and applications shouldn't need to care about this.


    What if they do care about this? I am writing a service.

    Friday, October 28, 2011 3:56 PM
  • >The application should treat its window being covered by the start screen the same as it would treat its window being covered by any other window.

    Didn't you have code for being covered by any other window?

    Sure you can find an unsupported way but it won't come from Microsoft, or they will be on the hook of supporting it.

     



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Friday, October 28, 2011 4:15 PM
  • I guess I am on my own, unless someone who is not affiliated with Microsoft posts the answer.

    Friday, October 28, 2011 6:16 PM
  • What problem are you trying to solve by knowing if the start screen is open?  There is probably a better way to solve that problem.

    Services run in a separate session and can't interact directly with interactive applications at all.  Even if you could rely on the start screen using a given window class the service couldn't see it. 

    --Rob

     

    Friday, October 28, 2011 10:22 PM
  • What problem are you trying to solve by knowing if the start screen is open?  There is probably a better way to solve that problem.

    I have an external device that needs to change colors when I switch between regular Desktop and Metro Start screen. Can you suggest a better way?

    Services run in a separate session and can't interact directly with interactive applications at all.  Even if you could rely on the start screen using a given window class the service couldn't see it. 

    This is not a problem. I can always run my service as an app.

    Friday, October 28, 2011 10:45 PM
  • We can close this thread. I already know the answer.
    • Marked as answer by Vadim Klishko Friday, November 4, 2011 4:27 PM
    Friday, November 4, 2011 4:26 PM
  • To follow up on this, you can use the IImmersiveModeNotification interface to tell if the launcher (Start Screen) is visible or if a given monitor is in immersive or desktop mode.  See http://code.msdn.microsoft.com/windowsdesktop/ImmersiveMode-sample-69e72200/sourcecode?fileId=42822&pathId=1477831994 for a sample.
    Thursday, November 17, 2011 7:07 AM