2010-11-08 呼叫營幕保護程式 (VB) 36057 0 VB 呼叫營幕保護程式 (VB) Option Explicit '聲明這個SendMessage的API使用 Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long '我們將要調用的那個消息,在MSDN中搜索WM_SYSCOMMAND就可以找到具體說明 Const WM_SYSCOMMAND = &H112 '這個參數指明了我們讓系統啟動營幕保護 Const SC_SCREENSAVE = &HF140& Dim k As Integer Private Sub Command1_Click() SendMessage Me.hwnd, WM_SYSCOMMAND, SC_SCREENSAVE, 0 End Sub 如有錯誤 歡迎指正 回首頁