Valhalla Legends Forums Archive | General Programming | ASCII key typer source (VB)

AuthorMessageTime
prairienetworks
Hey I am looking for the source code for one of those ascii key typers. You know, lots of buttons with ASCII and if you click one it displays that character in a text box that the user can then ctrl+c and paste in bnet. Even if it only has one button I would like to see the source code, I have no idea how to make it. Thanks for your help.
April 22, 2003, 11:47 PM
Yoni
What, you mean like charmap?
April 23, 2003, 12:07 AM
laurion
You know, theres this great site called www.pscode.com . Use it.
Search for character map. I have done this for you, though.
Character Map

[edit] realized it wasn't search results; it was just a site
April 23, 2003, 1:04 AM
iago
Just have a button, and when it's pressed, "txtOut = txtOut + chr(&h20)", and stuff like that :-/

It's horribly simple to do in vb...
April 23, 2003, 4:48 PM
Spht
[quote author=iago link=board=5;threadid=1127;start=0#msg8322 date=1051116523]
Just have a button, and when it's pressed, "txtOut = txtOut + chr(&h20)", and stuff like that :-/

It's horribly simple to do in vb...
[/quote]

Or you could set up a index of buttons all with the same name, then on Form_Load(), you'd write in the character you want for each button:

[code]Private Sub Form_Load()
Dim i%
For i = button.LBound To button.Ubound
button(i).Caption = Chr(65 + i)
Next i
End Sub[/code]

That example will loop through the button index and starting with 'A', it will caption all buttons 'A', 'B', 'C', etc. up to however many buttons you've placed on the form.

Then when you click a button, this could be called which will add the character to a variable or object (depending on what output is):

[code]Private Sub button_Click(Index As Integer)
output = output & button(i).Caption
End Sub[/code]
April 23, 2003, 7:25 PM
MesiaH
spht, are you sure button captions can display all extended ascii? i know the vb debug window and other manual controls cant...
April 24, 2003, 2:47 AM

Search