VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This code initiates the screen saver of the system.You can change the command constants to modify t

by Vishal V. Kulkarni (6 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Thu 3rd May 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This code initiates the screen saver of the system.You can change the command constants to modify the code for other windows operations.This

API Declarations


'This code is free.
'Contact [email protected] for furthur details
'This code can be customized as per requirement.
'Change commands to execute different system calls.
'This code assumes that you have a screen saver option is enabled in the system.

'Api declaration
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, _
ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Const comWM_SYSCOMMAND = &H112&
Const cSC_SCREENSAVE = &HF140&

Rate This code initiates the screen saver of the system.You can change the command constants to modify t



    'This can be your event to fire the screensaver.
    Dim lResult As Long
    lResult = SendMessage(Me.hWnd, comWM_SYSCOMMAND, cSC_SCREENSAVE, 0&)
End Sub




Download this snippet    Add to My Saved Code

This code initiates the screen saver of the system.You can change the command constants to modify t Comments

No comments have been posted about This code initiates the screen saver of the system.You can change the command constants to modify t. Why not be the first to post a comment about This code initiates the screen saver of the system.You can change the command constants to modify t.

Post your comment

Subject:
Message:
0/1000 characters