title: Screen information while Windows system is locked (.NET)
body: <p>We have a nightly process that updates applications on a user's pc, and that requires bringing the application down and back up again (not looking to get into changing that process).</p>
  
  <p>The problem is that we are building a Windows AppBar on launch which requires a valid screen, and when the system is locked there isn't one in the Screen class.  So none of the visual effects are enabled and it shows up real ugly.</p>
  
  <p>The only way we currently have around this is to detect a locked screen and just spin and wait until the user unlocks the desktop, then continue launching.  Leaving it down isn't an option, as this is a key part of our user's workflow, and they expect it to be up and running if they left it that way the night before.</p>
  
  <p>Any ideas??  I can't seem to find the display information anywhere, but it has to be stored off someplace, since the user is still logged in.</p>
  
  <p>The contents of the Screen.AllScreens array:</p>
  
  <p>** When Locked:</p>
  
  <pre><code>Device Name    : DISPLAY
  Primary        : True
  Bits Per Pixel : 0
  Bounds         : {X=-1280,Y=0,Width=2560,Height=1024}
  Working Area   : {X=0,Y=0,Width=1280,Height=1024}
  </code></pre>
  
  <p>** When Unlocked:</p>
  
  <pre><code>Device Name    : \\.\DISPLAY1
  Primary        : True
  Bits Per Pixel : 32
  Bounds         : {X=0,Y=0,Width=1280,Height=1024}
  Working Area   : {X=0,Y=0,Width=1280,Height=994}
  
  Device Name    : \\.\DISPLAY2
  Primary        : False
  Bits Per Pixel : 32
  Bounds         : {X=-1280,Y=0,Width=1280,Height=1024}
  Working Area   : {X=-1280,Y=0,Width=1280,Height=964}
  </code></pre>