Announcement

Collapse
No announcement yet.

Starting screensaver via code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adrian C Aitken
    replied
    Please ignore, I wasn't waiting long enough. If I wait 20 odd seconds then it asks for the password !

    Adrian

    ------------------

    Leave a comment:


  • Adrian C Aitken
    started a topic Starting screensaver via code

    Starting screensaver via code

    Hi all, the following code starts my screen saver but ignores the fact that I want a password to stop the scren saver.
    Does anyone know how to get it to start *AND* use the password function if ticked ? I'm using Windows 2000 and the screen saver works as it should if I let the timeout work.

    Regards
    Adrian

    Code:
    #COMPILE EXE
    #REGISTER NONE
    DECLARE FUNCTION GetDesktopWindow LIB "USER32.DLL" ALIAS "GetDesktopWindow" () AS LONG
    DECLARE FUNCTION SendMessage LIB "USER32.DLL" ALIAS "SendMessageA" (BYVAL hwnd AS DWORD, BYVAL wMsg AS LONG, BYVAL wParam AS LONG, BYVAL lParam AS LONG) AS LONG
    
    FUNCTION PBMAIN()
    SendMessage GetDesktopWindow(), 274&, 61760&, 0&
    END FUNCTION

    ------------------


    [This message has been edited by Adrian C Aitken (edited September 24, 2001).]
Working...
X