Results 1 to 6 of 6

Thread: using SystemParametersInfo

  1. #1
    Join Date
    Apr 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default using SystemParametersInfo

    Hey!
    In my app i want to use SPI_SCREENSAVERRUNNING from SystemParametersInfo to active screen saver
    My code:
    Qt Code:
    1. bool OldState=1;
    2. bool ok;
    3. #if defined(Q_WS_WIN)
    4.  
    5. ok=SystemParametersInfo(97, TRUE, &OldState, 0);
    6. QMessageBox::about(parent, "tytul", QString(ok?"T":"F"));
    7. #endif
    To copy to clipboard, switch view to plain text mode 

    In MessageBox I checking that screen saver is running but i still get "F" - False
    What i do wrong because i want to lock all shortkeys ex. alt+tab, alt+ctrl+delete
    Thank you in advance for your help
    Sory for my english

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: using SystemParametersInfo

    Why not ask GetLastError for the reason?

  3. #3
    Join Date
    Apr 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: using SystemParametersInfo

    there is any error from GetLastError. I would like to know there is any possibility to lock screen using SystemParametersInfo on windows xp and 2000 because i'm not sure that it is working on windows nt operating system

  4. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: using SystemParametersInfo

    Requirements

    Minimum supported client
    Windows 2000 Professional

  5. #5
    Join Date
    Apr 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: using SystemParametersInfo

    I'm testing it on windows xp and windows 2003 server

  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: using SystemParametersInfo

    Above you said Windows NT OS, which is not supported. On Windows XP and 2003 server, it should work as expected.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.