Friends,

I am novice to Visual Basic Programme.

I am using Visual Basic 2005 and I have TextBoxes, Lables and Buttons.

I want to name these controls. I wish to superscript the Text. i.e., to denote Sq.mm - as mm^2. But if we type or cut & paste from Ms Word, the typed name is changing as mm2. The power i.e. 2 can not to typed with superscript text.

Can any one suggest method for denoting the name with superscript text.

thanks in advance.

Senthil

In programming nothing is happening unless u explicitly write code for it. U have to use a rich text box instead of a normal textbox, also u have to write the code to change any selected text to superscript/subscript/bold/any other formatting to be done. say create a button and write code in its Click() event such as when u select certain text from the rich textbox and then click that button, the text is applied the superscript format.

Thanks Mr.Aktharshaik.

I understand that wiriting code is the only method to change the text property during run time.

However, is it required for naming the caption of Button or Lable.

Can you pl. elaborate the same?

Thanks

Hi,

You have 2 Options.. Create Small BMP files with all the Font Requires, and Load the Pictures on the Command Button..
Use RichTextBox, instead of Label and TextBox..

Regards
Veena

Friends,

Thanks for your various suggesions.

I found some other alternate solution offered by Kasbaba.

The solution offered by Kasbaba is:

Goto Start->Programs->Accessories->System tools->Character Map
Now select this Character ² from the Characters listed.
Click Select
Click Copy

Then try to change the text of any control by pasting this Character in the Lable or Button Caption at Properties.

Even you can wrting code also like this:
Code\Button1.Text = "mm ²"\Code

This is working fine with me.

Hope that this can solve the problem for many others.

Once again thanks to all who took pain in advising me.

Senthil

This article has been dead for over six months. Start a new discussion instead.