vbturbo
asked on
character code for cubic meter
Hi
what is the char code for m3 ?
Char chr = Keys.Alt And Keys(252);
or
Char chr = Alt+252;
i need to present e.g 2.34 m3 into a label
pls see attached image
thanks
vbturbo
m3.gif
what is the char code for m3 ?
Char chr = Keys.Alt And Keys(252);
or
Char chr = Alt+252;
i need to present e.g 2.34 m3 into a label
pls see attached image
thanks
vbturbo
m3.gif
ALT + 0179 = ³
³ or ³
?
Maby i am missunderstanding the question :)
http://www.tntluoma.com/sidebars/codes/
?
Maby i am missunderstanding the question :)
http://www.tntluoma.com/sidebars/codes/
The Unicode character code for a superscript 3 is: 0xb3.
You can find character codes using Charmap.exe (Character Map). You'll find the unicode for the selected character presented in bottom left of the window.
Code sample is shown using two different ways to utilise the character code. You should also be able to directly include the character in your code.
You can find character codes using Charmap.exe (Character Map). You'll find the unicode for the selected character presented in bottom left of the window.
Code sample is shown using two different ways to utilise the character code. You should also be able to directly include the character in your code.
decimal vol = 2.34m;
// Option 1
label1.Text = string.Format("{0} m{1}", vol, Convert.ToChar(0xB3));
// Option 2
label1.Text = string.Format("{0} m\u00B3", vol);
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Hi
thanks for reply
im not trying to catch any key events i just want to concat a string with m3
this only gives me " chr = 2 "
{
string chr = ((char)(char)(string)(Form s.Keys.Alt + 179)).ToString();
}
thanks for reply
im not trying to catch any key events i just want to concat a string with m3
this only gives me " chr = 2 "
{
string chr = ((char)(char)(string)(Form
}
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thank you both for input
skronkDate - your code did the job
skronkDate - your code did the job