首页 > 开发 > 综合 > 正文

调用屏幕保护 40Star(原作)

2020-02-03 13:38:14
字体:
来源:转载
供稿:网友

想要调用系统屏幕保护,主要是发送一个wm_syscommand消息即可。

    private declare function sendmessage lib "user32" alias "sendmessagea" (byval hwnd as int32, byval wmsg as int32, byval wparam

as int32, byval lparam as int32) as int32
    private const hwnd_broadcast = &hffff&
    private const wm_syscommand = &h112
    private const sc_screensave = &hf140&

    private sub button1_click(byval sender as system.object, byval e as system.eventargs) handles button1.click
        sendmessage(hwnd_broadcast, wm_syscommand, sc_screensave, 0)
    end sub



发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表