|
|
|
|
|
Dicas
|
|
Visual Basic (Windows)
|
|
|
Título da Dica: Ativar modo de espera e Protetor de Tela
|
|
|
|
Postada em 30/12/2003 por ~Ð@®£@Ñ
Private Declare Function modoespera Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, _ ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As Long) As Long Private Declare Function protetortela 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 Command1_Click() Dim result As Long result = protetortela(Me.hWnd, WM_SYSCOMMAND, SC_SCREENSAVE, 0&) End Sub
Private Sub Command2_Click() Dim result As Long result = modoespera(Me.hWnd, WM_SYSCOMMAND, SC_SCREENSAVE, 0&) End Sub
|
|
|
|
|