
-----------------------------------
JSBN
Sat May 24, 2003 2:16 pm

Getting an ascii character
-----------------------------------
Any one know how i'd go about doing a getch type thing in VB (w/o a promp if possible)?
[/code]

-----------------------------------
Tony
Sat May 24, 2003 4:43 pm


-----------------------------------

Private Sub Form_KeyPress(KeyAscii As Integer)
Print Chr(KeyAscii)
End Sub


-----------------------------------
JSBN
Sat May 24, 2003 5:35 pm


-----------------------------------
but that only works when i have it in a program by its self :/

-----------------------------------
Tony
Sat May 24, 2003 8:13 pm


-----------------------------------
what do you mean?

-----------------------------------
JSBN
Sun May 25, 2003 1:39 pm


-----------------------------------
nothing happens when i put that code in.... it only seems to work when i put it in it's own seperate program. My program has buttons and other things that i think might interfere with your code's functionallity.

-----------------------------------
Tony
Sun May 25, 2003 1:47 pm


-----------------------------------
well since its form_keypress you need to have your form active.. click on some empty space...

its also not gonna work if you named your form anything other then form

-----------------------------------
JSBN
Sun May 25, 2003 1:56 pm


-----------------------------------
well i changed it to Form1_KeyPress......
and it still doesn't work :/

-----------------------------------
Tony
Sun May 25, 2003 5:11 pm


-----------------------------------
post your files, I'll help you edit it to make it work

-----------------------------------
JSBN
Sun May 25, 2003 5:21 pm


-----------------------------------
hmm.... because i am not mod here, i cant attatch. i'll just pm them to u k?

-----------------------------------
FDisk87
Fri Dec 05, 2003 4:51 pm


-----------------------------------
Make sure the key preview property is set to true on the form designer.
