Link to home
Start Free TrialLog in
Avatar of Mikal613
Mikal613Flag for United States of America

asked on

Paste Special Character into TextBox

I have a regular vb app and i wanna paste from a document into a textbox for example a Russian letter. I get a ? in the textbox instead.

I know about the RichTextBox but im not changing a 1000 textboxes.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of List244
List244

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mikal613

ASKER

The font is installed
Avatar of List244
List244

The font may be installed, but it must be set in the textbox.  A standard textbox may only hold one font at a time.  So unless
it is set to that font, it will be unable to display the character.  The RTF boxes differ from this in the way that they can display
multiple fonts at one time.  This is why it necessary to use another type of textbox.
you want to make an multilingual application,

locale, fonts and charset are all included in this topic
 
A textbox can have more than one font. IF you press alt shift it changes fonts with keeping the previous characters.
Mika, which language are you using?  Visual Basic 6?  .NET 2003?  2005?

I have never seen nor heard of this alt+shift for changing fonts.  And in Visual Basic 6, the standard text box
can only hold one font at a time.  Changing a font in a standard text-box changes the font of the entire box.
vb6

Yes when you press alt shift it changes the font.
Milka, this does not happen when I press alt + shift.  Which OS are you running?  And like stated previously a change
in font should change the entire box.  This is why you can't paste just one special character, the box does not know
how to display it in the current font-setting.  This is why we have the Rich Text File boxes, so that we may add multiple
fonts colors and settings.
open a new project

add a textbox

write some alpha characters
press alt shift
write some alpha characters
press alt shift again
write some alpha characters
press alt shift again
write some alpha characters
press alt shift again

and youll see the font change
Again, this does not do anything for me.  Which OS are you running?
Can you post a screenshot somewhere to show what you see?
here is my regular font руку шы ьн туц ащте вщ нщг дшлу ше,,,

Like that exactly
woooo thats amazing when i wrote it it looked differntly.

It seems the EE database is using varchar and not nvarchar because it converted my string.
you need to add unicode support  to your textboxes(google it) and ensure that their default font is the one that displays those characters.
im waiting for something that i can actually use.

Sorry dan im gonna send this to CS
Mika, again, why not use a Rich Text Box?  I am telling you the standard box only supports one font.
"I know about the RichTextBox but im not changing a 1000 textboxes."
I gave you code that would allow you to make an EXE that would allow FRM files to be dragged into it for
running, and it would fix them for you.
im not gonna rely on that. I have 1800 clients
Heh, 1800 clients, thousands of textboxes, and rather than try, you just let the months pass by.  No offense, but you could have
been done by now.
its not as hard to change text boxes (to richtext) as you think:
open a vbp file in notepad and use the find/replace function