Click to See Complete Forum and Search --> : KeyboardManipulation


Salsito
January 16th, 2000, 09:32 AM
Is it possible to activate or deactivate keys on the keyboard through VB-API?

All help and or other ideas are welcome.

Lothar Haensler
January 17th, 2000, 01:22 AM
Depending on what you want to do, you can use VB's SendKeys statement or the SendInput API

bharat
January 21st, 2000, 04:23 AM
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