求助:获得键盘信息的代码中有几句不明白
Declare Function GetCaretBlinkTime Lib "user32" () As LongPublic Const SPI_GETKEYBOARDSPEED = 10
Public Const SPI_GETKEYBOARDDELAY = 22
Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, ByVal fuWinIni As Long) As Long
Declare Function GetKeyboardType Lib "user32" (ByVal nTypeFlag As Long) As Long
Private Sub Command1_Click()
End
End Sub
Private Sub Form_Load()
Dim r As Long
Dim t As String
Dim k As Long
Dim q As Long
k = GetKeyboardType(0)
If k = 1 Then t = "PC or compatible 83-key keyboard"
If k = 2 Then t = "Olivetti 102-key keyboard"
If k = 3 Then t = "AT or compatible 84-key keyboard"
If k = 4 Then t = "Enhanced(IBM) 101-102-key keyboard"
If k = 5 Then t = "Nokia 1050 keyboard"
If k = 6 Then t = "Nokia 9140 keyboard"
If k = 7 Then t = "Japanese keyboard"
lblkeyboard = "键盘类型: " & t
q = SystemParametersInfo(SPI_GETKEYBOARDDELAY, 0, r, 0)
lblrepeatdelay = "键盘重复敲击延迟时间 = " & r & " 秒"
q = SystemParametersInfo(SPI_GETKEYBOARDSPEED, 0, r, 0)
scrRepeatSpeed = r
lblrepeatspeed = "键盘重复敲击速度 = " & r & " 字符/秒"
scrCaretFlash = GetCaretBlinkTime
lblcaretflash = "插入符光标的闪烁速度 = " & GetCaretBlinkTime & "ms"
End Sub
请问红笔标记的地方为什么要赋值呢?赋其他的值可以吗?