humcfc
humcfc

Reputation: 349

How can I show a superscript character in .NET GUI labels?

Is it possible to Build a string or fix the label in the GUI so that I get square meter information to the user. So that the output will look like 21 m2 but the 2 is raised.

Regards

Upvotes: 8

Views: 8421

Answers (3)

Use the "²" caracter : 21 m²

The unicode code point is U+00B2 and the UTF-8 hexadecimal is c2 b2

Upvotes: 6

Raithlin
Raithlin

Reputation: 1774

In the label, use the HTML character reference "²" for the superscript in m².

Upvotes: 1

Martin
Martin

Reputation: 40365

Use a font that has the ² character.

Eg MS Sans Serif : 0xB2

Upvotes: 1

Related Questions