Alias "SendMessageA" (ByVal hWn,标题:使用 API 开始屏幕保护" /> 使用 API 开始屏幕保护 - 关于VB的经验之谈 - VB爱好者乐园(VBGood) - 关于VB的经验,电子教程,代码,控件,论坛,博客,微博等.

VBGood网站全文搜索 Google

搜索VBGood全站网页(全文搜索)
首页 - 经验之谈 - 使用 API 开始屏幕保护
发表评论(0)作者:, 平台:, 阅读:11727, 日期:2000-03-12
声明:

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&)