pip install ctypes

from ctypes import *
while True:
u = windll.LoadLibrary('user32.dll')
result = u.GetForegroundWindow()
time.sleep(5)
print(result) # 0则表示锁屏

# u.LockWorkStation() 直接锁住

相关文章:

  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
  • 2021-09-03
  • 2021-08-15
  • 2022-12-23
  • 2021-05-01
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-15
  • 2022-02-09
  • 2021-12-18
相关资源
相似解决方案