توي vb چجوري ميشه وضعيت دكمه scroll lock رو چك كرد ؟ دوستان اگه محبت كنن راهنمائي كنن ممنون ميشم .
Printable View
توي vb چجوري ميشه وضعيت دكمه scroll lock رو چك كرد ؟ دوستان اگه محبت كنن راهنمائي كنن ممنون ميشم .
کد:Const VK_OEM_SCROLL = &H91
Private Declare Function GetKeyState Lib "user32.dll" (ByVal nVirtKey As Long) As Integer
Private Sub Command1_Click()
Dim keystate As Integer
keystate = GetKeyState(VK_OEM_SCROLL)
If keystate And &H1 Then
Text1.Text = "The Scroll Lock is ON."
Else
Text1.Text = "The Scroll Lock is OFF."
End If
End Sub
کد:Const VK_OEM_SCROLL = &H91
Private Declare Function GetKeyState Lib "user32.dll" (ByVal nVirtKey As Long) As Integer
Private Sub Command1_Click()
Dim keystate As Integer
keystate = GetKeyState(VK_OEM_SCROLL)
If keystate And &H1 Then
Text1.Text = "The Scroll Lock is ON."
Else
Text1.Text = "The Scroll Lock is OFF."
End If
End Sub