Use this app to get the Ascii values of the keys on the keyboard.
Use this app to get the Ascii values of the keys on the keyboard.
Last edited by Nightwalker83; Apr 29th, 2011 at 03:39 AM. Reason: Reuploading source code!
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
Please consider giving me some rep points if I help you a lot.
DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
Please rate my post if you find it helpful!
Technology is a dangerous thing in the hands of an idiot! I am that idiot.
Didn't try the .exe tho (viruses)
But this is also an option:
VB Code:
'Place a ListBox on a Form. 'Will display All Ascii Characters Private Sub Form_Load() Dim i As Integer For i = 0 To 255 List1.AddItem "Decimal: " & i & " = Char: " & Chr(i) Next End Sub
Handy References:
MSDN Library
ADO Tutorial Excel Tutorial MZTools (VB6)
- Please pull down the Thread Tools menu and click the 'Mark Thread Resolved' button, or alternately edit your original post and add "Resolved" or place a
in the subject when your question(s) have been answered.
- Please use code tags [highlight=vb] your code goes here between the tags [/highlight] when posting code.
Hi,
This code will output (to a text file) the ascii value of the key on the keyboard which was pressed. This code was written in Visual Basic 6.0.
vb Code:
Private Sub Command1_Click() Unload Me 'End End Sub Private Sub Text1_Change() Open App.Path & "\keyboard.txt" For Append As #1 Print #1, Label2.Caption & " " & Text1.Text Close #1 End Sub Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) Label2.Caption = Chr(KeyCode) Text1.Text = KeyCode End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) Label2.Caption = Chr(KeyAscii) MsgBox "Asciikey: " & KeyAscii End Sub
Edit:
The commented out parts were apart of the original code but are not needed to preform the task suggested in the thread title.
Nightwalker
Last edited by Nightwalker83; Mar 15th, 2010 at 08:28 PM. Reason: Fixing spelling
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
Please consider giving me some rep points if I help you a lot.
DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
Please rate my post if you find it helpful!
Technology is a dangerous thing in the hands of an idiot! I am that idiot.
helpful ty
I found that you are using End in most of your projects. That's not a good practice. See this FAQ for more details: Why is using the 'End' statement (or VB's "stop" button) a bad idea? ...
Good luck ...![]()
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD Athlon X2 5200+, ASUS Motherboard, 2 GB RAM, 400 GB HDD, Nvidia 8600 GT 512MB, 19.5" TFT(Wide), Creative 5.1 Home Theater
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
Please consider giving me some rep points if I help you a lot.
DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
Please rate my post if you find it helpful!
Technology is a dangerous thing in the hands of an idiot! I am that idiot.
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD Athlon X2 5200+, ASUS Motherboard, 2 GB RAM, 400 GB HDD, Nvidia 8600 GT 512MB, 19.5" TFT(Wide), Creative 5.1 Home Theater
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
Please consider giving me some rep points if I help you a lot.
DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
Please rate my post if you find it helpful!
Technology is a dangerous thing in the hands of an idiot! I am that idiot.
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD Athlon X2 5200+, ASUS Motherboard, 2 GB RAM, 400 GB HDD, Nvidia 8600 GT 512MB, 19.5" TFT(Wide), Creative 5.1 Home Theater
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
Please consider giving me some rep points if I help you a lot.
DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
Please rate my post if you find it helpful!
Technology is a dangerous thing in the hands of an idiot! I am that idiot.