Tech Off Thread

4 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Insert Character

Back to Forum: Tech Off
  • User profile image
    itprochris

    How can you insert a symbol (ex. accent) into a textbox in VB? I want users to be able to click a button and the symbol that they click be inserted into the textbox named txtText. Thanks!Smiley

  • User profile image
    RobChartier

    The easiest way would be to simply do something like:

    funnyEButton.Text="ë"

    and then on button click

    txtText.Text=funnyEButton.Text

    to get the funny e, just simply hold down the ALT key and using the numeric keypad punch the DEC (base 10) value of item you wish.

    Here is the ASCII Table: http://www.asciitable.com

    Notice the column titled "Dec".

    So when I do, ALT+137  i get a:  ë

    Simple as that.


    OR, you can do something like this:

    Dim funnyE As Integer = 137
    txtText.Text = Convert.ToChar(funnyE)

  • User profile image
    itprochris

    what about math symbols?Perplexed

  • User profile image
    itprochris

    oh sorry, didn't see that the ascii table included math symbols. thanks a lot!

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.