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.
What, you mean like charmap?
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 (http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=21241&lngWId=1)
[edit] realized it wasn't search results; it was just a site
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 from: iago on April 23, 2003, 11:48 AM
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...
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:
Private Sub Form_Load()
Dim i%
For i = button.LBound To button.Ubound
button(i).Caption = Chr(65 + i)
Next i
End Sub
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):
Private Sub button_Click(Index As Integer)
output = output & button(i).Caption
End Sub
spht, are you sure button captions can display all extended ascii? i know the vb debug window and other manual controls cant...