[求助]怎样让numlock关不了
谁能帮我写一个小小的程序功能:
只要能让NumLock灯一直打开就可以.不能关闭,除非关闭软件.
就是检测到NumLock灯没打开,程序就会自动开打.
谢谢!
祝大家快乐.
[此贴子已经被作者于2007-9-8 14:06:29编辑过]
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Private Declare Function keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long) As Boolean
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
Dim ERT As Boolean
If GetKeyState(&H90) = 0 Then
ret = keybd_event(&H90, 0, 0, 0)
ret = keybd_event(&H90, 0, 2, 0)
End If
End Sub