Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#3 If workstation is locked.

open-accepted
Gerald Evans
SwapScreen (2)
5
2012-10-17
2012-10-17
William LeVan
No

On my Windows XP machine I have it set to lock the workstation after I enter my password. That way I walk away and not have to wait for Explorer to launch before locking the workstation (Windows-L). If I am in this state and Swap Screen automatically launches, Swap Screen fails to swap. To see this for yourself create a batch file similar to the following (Close SwapScreen before running):
@echo off
rundll32.exe user32.dll,LockWorkStation
ping localhost -n 5
Swapscreen.exe

Discussion

  • Gerald Evans
    Gerald Evans
    2012-10-17

    The root of the problem is that the .NET framework object Screen.AllScreens only contains the primary screen when the application is started this way, so it looks like a .NET framework bug to me.
    If you use Windows to change the number of screens, then Screen.AllScreens does get updated correctly, and SwapScreen works as expected.
    I just need to find a way to trigger Screen.AllScreens to update itself when SwapScreen is started this way and the session is unlocked.

     
  • Gerald Evans
    Gerald Evans
    2012-10-17

    • status: open --> open-accepted