Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Starting The Screen Saver
Message
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Title:
Starting The Screen Saver
Miscellaneous
Thread ID:
00645051
Message ID:
00645051
Views:
34
Why doesnt this work? It runs in VFP. I'm on win 2000


Option Explicit

Const WM_NULL = 0
Const WM_SYSCOMMAND = 274 ' 0x112
Const SC_SCREENSAVE = 61760 ' 0xF140

Declare Function GetFocus Lib "user32.dll" () As Long
Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" _
(ByVal hWnd As Long, ByVal Msg As Long, wParam As Any, lParam As Any) As Long


Public Sub Main()

Dim lHandle As Long

lHandle = GetFocus()

SendMessage lHandle, WM_SYSCOMMAND, SC_SCREENSAVE, WM_NULL

End Sub

Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Reply
Map
View

Click here to load this message in the networking platform