
How to start a screen saver?
Martin try this to programaticaly <sp> start the screensaver that is set in the Windows ini files.
Curt
Declare Function SendMessage Lib "User" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Long
'In the following example, a command button starts the Form1 screen saver:
Sub Command1_Click ()
Dim result As Long
Const WM_SYSCOMMAND = &H112
Const SC_SCREENSAVE = &HF140
result = SendMessage(Form1.hWnd, WM_SYSCOMMAND, SC_SCREENSAVE, 0&)
End Sub
Quote:
>I want to make a screen saver, which does not start itself when called by
>Windows, but starts any other of the screen savers. But I don't know how
>Windows starts a saver.
>I tried with SHELL, but this is obviously wrong.
>If anyone could help me, this would be great.
>Martin