Cemalizim | 21 Temmuz 2008 18:15 | Caps Lock ve Num Lock tuşlarının durumları PHP- Kodu: '// Kaynak: vbaccelerator.com '// Forma bir adet label ve bir adet timer ekleyin '// timer'ın interval değerini 250 yapın Private Declare Function GetKeyboardState Lib "user32" (pbKeyState As Byte) As Long Private Sub Timer1_Timer() Dim b(0 To 254) As Byte Dim sMsg As String GetKeyboardState b(0) If b(vbKeyNumlock) Then sMsg = "NUM" End If If b(vbKeyCapital) Then sMsg = sMsg & " CAPS" End If If (Label1.Caption <> sMsg) Then Label1.Caption = sMsg End If End Sub
Alıntı |