VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Start a screen saver from your code

by Timur (2 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (39 Votes)

This code, you may insert in your program, allows to start a screensaver.
Many other usefull solutions you'll find on my site: https://www.netcity.ru/~timur555/
Glad
to see you !!!

API Declarations
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
Private Const WM_SYSCOMMAND = &H112&
Private Const SC_SCREENSAVE = &HF140&

Rate Start a screen saver from your code

'Place this two lines of code any where in your program
'...
'enjoy!
 Dim tmp As Long
 tmp = SendMessage(Me.hWnd, WM_SYSCOMMAND, SC_SCREENSAVE, 0&)

Download this snippet    Add to My Saved Code

Start a screen saver from your code Comments

No comments have been posted about Start a screen saver from your code. Why not be the first to post a comment about Start a screen saver from your code.

Post your comment

Subject:
Message:
0/1000 characters