Discussion Locked

key combinations in vb6

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
does anybody know how i would go about executing an Alt+(any number on the numpad like 92) so it would print the relevant ascii character. never mind why i would wanna do that but if there is a way, i would sure be glad to know about it. please include the complete details. i shall be obliged. thanks.

1 reply

by rsv

HI,
Where u want the relevant ascii character to be printed and on what action do u want it to execute? Here I am giving me two methods,
1.First Method: Write this code
Private Sub Form_KeyPress(KeyAscii As Integer)
MsgBox Chr(KeyAscii)
End Sub

Focus on form and then Press Alt + (any number on the numpad), then you will get the messagebox with that relevant ascii character

2.Second Method:
Place a text box on the form, and run the form and put focus on textbox (cursor in textbod) and then press Alt + (any numbers on the numpad), then that relevant ascii character will be displayed in the textbox.

Hepoe this helps you.
GOOD LUCK...:)

This discussion is closed to new replies.