[2005] Unicode in Labels and Textboxes
Hello everyone.
I'm looking for a way to display anyUnicode[/b] character on a label, or in a Textbox - similar to what the Windows Character Map does. in the Character Map, you can select any font, and any character, and it gets displayed inside the textbox, allowing you to copy that.
Let me explain how my program works.
it opens the Character map, then, I can copy those characters. Once copied, I want to display that specific character in one of my textboxes. I spent days trying to find a solution - some said I must use the "Arial unicode MS" font, and save the form with UTF 8 encoding - that didn't work. I've read about using a RTB, but, I need to display it on a lable as well.
Can anybody please advise me?
Re: [2005] Unicode in Labels and Textboxes
I think a RichTextBox could work. As for the Label, you could try applying some properties to the RichTextBox such as removing the border, changing the BackColor to that of the Container, set it to Read-only, etc.
Re: [2005] Unicode in Labels and Textboxes
Thanx Fromethius, but, still, it doesn't work. Insetad of giving me the exact symbol, it just shows the ASCII (I think) representation of that symbol, for example, I took a symbol with the Unicode value of : U+004D
and I got M showing in all three (the label, textbox and rtb)
with this code:
Code:
TextBox1.Text = Clipboard.GetText
lblPreview.Text = Clipboard.GetText
rtb.Text = Clipboard.GetData(System.Windows.Forms.DataFormats.UnicodeText)
Any other suggestions?
Re: [2005] Unicode in Labels and Textboxes
One or both worked in the past but I can't remember which one...
Select Arial Unicode MS for control's font (hmpf, just saw you already tried that).
Save your form in Unicode (hmpf², I really should read the questions more thouroughly)
So I fired up Visual Studio and tested it :)
U+004D is indeed 'M' so it is to be expected that your controls are showing Ms too.
Set your controls' Font to Arial Unicode MS and try with the U+2593. It is the ▓
You can event copy it from this post - it should work.