VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

CheckKeypress

Martin Idman  (6 Submissions)   VB function enhancement   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

Inputs
KeyAscii from controls keypress-event cAllowed as a string ("N" for numbers only...)

Assumes
Put the call in a controls keypress-event Ex: KeyAscii=CheckKeypress(KeyAscii, "N") Will only allow the user to enter digits in a control

Returns
KeyAscii for pressed key if ok or nothing and a beep for not ok

API Declarations

Rate CheckKeypress (5(5 Vote))
CheckKeypress.bas

CheckKeypress Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters