在输入密码时, 如果大写键开启能给出提示, 觉得很方便( XP 登录 ,QQ登录那样)
下面是一段VB 的代码, 求热心人将其转成VFP
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Private Const VK_CAPITAL As Long = &H14
Private Const VK_NUMLOCK As Long = &H90
Private Const VK_SHIFT = &H10
Private Sub Command1_Click()
If GetKeyState(VK_CAPITAL) Mod &HFF80 = 1 Then
label1.Caption = "当前处于大写状态"
Else
label1.Caption = "当前处于正常输入状态"
End If
End Sub
------解决方案--------------------------------------------------------
if capslock() == .t.
messagebox("大写键开启")
else
messagebox("处于小写状态")
endif