SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Dec 2007
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Using a dll to disable the screensaver

    Hi,
    I am trying to use a dll which would allow me to enable and disable the screensaver on my PC. Unfortunately I can not get this to work and am not sure what I am doing wrong. I have pasted the code below and would appreciate any help.



    Private Const SPI_SETSCREENSAVEACTIVE = "17"
    Private Const SPI_GETSCREENSAVEACTIVE = "16"
    Private Const SPIF_SENDWININICHANGE = "&H2"
    Private Const SPIF_UPDATEINIFILE = "&H1"


    Extern.Declare micLong, "SystemParametersInfo", "user32.dll", "SystemParametersInfoA", micLong, micLong,micVPtr ,micLong

    extern.SystemParametersInfo SPI_SETSCREENSAVEACTIVE, TRUE, "0&", SPIF_SENDWININICHANGE

  2. #2
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Using a dll to disable the screensaver

    try to set the reg-key for this:

    [HKCU\Software\Poli
    cies\Microsoft\Windows\Control Panel\Desktop]
    "ScreenSaveActive"="0"
    "ScreenSaverIsSecure"=dword:00000001
    "ScreenSaveTimeOut"="0"
    "SCRNSAVE.EXE"=""
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  3. #3
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Using a dll to disable the screensaver

    Look in the QTP FAQ post and there is a post on how to avoid getting the screen saver to run.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 10:25 AM.

Copyright BetaSoft Inc.