|
|
|
|
|
Dicas
|
|
Visual Basic (Windows)
|
|
|
Título da Dica: Ativando o ScreenSaver Através de API
|
|
|
|
Postada em 21/8/2003 por d@®l@n
'Num módulo:
#If Win32 Then 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& #Else Private Declare Function SendMessage Lib _ "User" (ByVal hWnd As Integer, _ ByVal wMsg As Integer, ByVal _ wParam As Integer, lParam As Any) _ As Long Const WM_SYSCOMMAND = &H112 Const SC_SCREENSAVE = &HF140& #End If
'Para chamar o ScreenSaver, use o código a 'seguir:
Dim result As Long result = SendMessage(Form1.hWnd, WM_SYSCOMMAND, _ SC_SCREENSAVE, 0&)
|
|
|
|
|