Hello Everybody,
Can anyone explain me briefly how to check the caps lock keys status in vb application without using timer control.
I have checked the status of the caps lock key by using timer control as follows.
************************************************************************
********************* codes ******************************
************************************************************************
I have taken a label & named it lblCapsLock. Then take a timer control & named as timer1. Set the timer1 control properties Enable, False to True and interval= 1000.
Now on tick event of the timer control I have written
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
lblCapslock.Text = "CAPS LOCK: " & IIf(My.Computer.Keyboard.CapsLock = True, "ON", "OFF")
End Sub
similarly U can set the status for other keys.
It works nice. But, I want to know that, how to set the status without using timer control. If anybody knows then please tell me.
Regards,
Subrat, Desktop Application Developer
Rourkela, Orissa, India :-O :cool::cool::thumbsup::cool::thumbsup: