|
-
Mar 7th, 2007, 04:39 AM
#1
Thread Starter
Member
keycode
hi,
is there a function that returns the keycode ?
thank you in advance
-
Mar 7th, 2007, 04:52 AM
#2
Re: keycode
could you elaborate a little?
-
Mar 7th, 2007, 04:55 AM
#3
Re: keycode
KeyDown and KeyUp events. For example (the KeyDown):
Code:
Private Sub txtText1_KeyDown(KeyCode As Integer, Shift As Integer)
Debug.Print KeyCode
End Sub
-
Mar 7th, 2007, 04:58 AM
#4
Thread Starter
Member
Re: keycode
thank you .
I know it is used in the keydown event.. but i want to use it separately . KEYDOWN and KEYUP takes the character typed on the keyboard and gives its keycode I want a function or method that takes the character and returns the keycode ..
for example keypress takes the KEYASCII as a parameter , but also we can use the AscW(character) as a separate method
thanx
-
Mar 7th, 2007, 05:22 AM
#5
Re: keycode
KEYDOWN and KEYUP don't take the character that was typed. KeyCode is an indication of the keyboard key that was pressed.
what do you expect your function to take as characters don't map to keycodes?
also, why do you want to do this?
-
Mar 7th, 2007, 01:54 PM
#6
Re: keycode
Do you mean
vb Code:
Dim iCode As Integer
iCode = Asc(sChar)
Asc is a function, not a method.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|