Is it possible to activate or deactivate keys on the keyboard through VB-API?
All help and or other ideas are welcome.
Printable View
Is it possible to activate or deactivate keys on the keyboard through VB-API?
All help and or other ideas are welcome.
Depending on what you want to do, you can use VB's SendKeys statement or the SendInput API
You can use Events like keypress,keydown like that for example u do not want any characters in a text box an example of a code will be
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii > 64 And KeyAscii < 91 Or KeyAscii > 96 And KeyAscii < 123 And KeyAscii = 32 Then
Exit Sub
Else
KeyAscii = 0
End If
End Sub
try this into a text box keypress event u'll not be able to enter any numbers it all will get deactivated like that u can do many things in this event
try this
happi programmin'
bharat