Login
网站首页 > 文章中心 > VB6

VB6检测电脑是否锁屏

作者:小编 更新时间:2024-01-21 11:13:31 浏览量:84人看过

Option Explicit


Private Declare Function GetForegroundWindow Lib "user32" () As Long


Private Sub Form_Load()

    Timer1.Interval = 100 ' 设置定时器间隔(单位:毫秒)

    Timer1.Enabled = True ' 启动定时器

End Sub


Private Sub Timer1_Timer()

    If GetForegroundWindow() = 0 Then

        MsgBox "已锁屏"

    End If

End Sub


版权声明:倡导尊重与保护知识产权,本站有部分资源、图片来源于网络,如有侵权,请联系我们修改或者删除处理。
转载请说明来源于"土嘎嘎" 本文地址:http://www.tugaga.com/jishu/vb/1864.html
<<上一篇 2024-01-16
下一篇 >> 2024-03-08

编辑推荐

热门文章