This code is the scrnsave.exe Visual Basic v5.0a source:

  ' placed in form1..

  ' calls the system screen saver.
  Option Explicit

  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 wm_syscommand = &H112&
  Const sc_screensave = &HF140&

  Private Sub Form_Load()
  Dim s As Integer
  s = sendmessage(Form1.hwnd, wm_syscommand, sc_screensave, 0&)
  End
  End Sub

-end-
