Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 673587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:36:44+00:00 2026-05-14T00:36:44+00:00

We have a nightly process that updates applications on a user’s pc, and that

  • 0

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).

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.

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.

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.

The contents of the Screen.AllScreens array:

** When Locked:

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}

** When Unlocked:

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}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:36:44+00:00Added an answer on May 14, 2026 at 12:36 am

    There is no clean solution for this, Windows doesn’t provide a way to detect that the work station is locked and that the “wrong” desktop is active. You can only detect the session switch, sample code is here. To make this work, you’re pretty much forced to include this code in the app and have it leave a breadcrumb that it could read back when it starts back up. Be sure to reset it after you used it once so that the app cannot get stuck permanently.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 326k
  • Answers 326k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It should work for you if you remove the var… May 14, 2026 at 1:46 am
  • Editorial Team
    Editorial Team added an answer This worked for me on Firefox 3.7a. Two things changed:… May 14, 2026 at 1:46 am
  • Editorial Team
    Editorial Team added an answer I am not aware of existing, widely-available implementations, but if… May 14, 2026 at 1:46 am

Related Questions

Update: I have now written a PHP extension called php_ssdeep for the ssdeep C
We are using Maven for a large build process (> 100 modules). We have
We want to have our test servers databases updated from our production server databases
is there a good way to back up all the code and content on
We have a process that runs prior to our nightly builds. If the process

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.