标题: 如何利用API函数使Windows开始屏幕保护? [打印本页] 作者: 张志强 时间: 2013-7-2 13:34 标题: 如何利用API函数使Windows开始屏幕保护? 作者: 淡写轻描 时间: 2013-7-2 13:39
*API函数声明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&注释:调用Dim result As Long result = SendMessage(Form1.hWnd, WM_SYSCOMMAND, SC_SCREENSAVE, 0&)