Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unicode string in VB6 controls

279 views
Skip to first unread message

S N

unread,
Mar 3, 2010, 5:42:05 AM3/3/10
to
I have a VB6 project using standard VB6 textbox controls. They are not
taking in Unicode characters in Hindi Language.
How do I modify the code so as to enable data entry in Unicode in Hindi
Language without changing the control itself (by using RichText Box Control
or Forms 2.0 controls as indicated on MSDN site).

S N

ralph

unread,
Mar 3, 2010, 10:22:48 AM3/3/10
to

You can't. Inherent VB6 textboxes don't speak Unicode.
You will have to find a Unicode replacement, adopt one of MS's
suggestions, or go find another alternate on the web. Some free, some
pricey.

S N

unread,
Mar 3, 2010, 10:30:34 AM3/3/10
to
Is there somthing related to Fonts.charset which can help me in solving my
problem?


"ralph" <nt_cons...@yahoo.net> wrote in message
news:bhvso5p1n44ojb58h...@4ax.com...

S N

unread,
Mar 3, 2010, 10:31:55 AM3/3/10
to
Can someone advise me on one of the free solutions for the problem indicated
earlier.


"ralph" <nt_cons...@yahoo.net> wrote in message
news:bhvso5p1n44ojb58h...@4ax.com...

Timo Kunze

unread,
Mar 3, 2010, 1:42:59 PM3/3/10
to
Am 03.03.2010 16:31, schrieb S N:
> Can someone advise me on one of the free solutions for the problem indicated
> earlier.

On my website I provide free Unicode controls that can replace most of
the VB6 controls.

Timo
--
www.TimoSoft-Software.de - Unicode controls for VB6
"Those who sacrifice freedom for safety deserve neither."
"Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der
Überzeugung, dass die demokratischen Kräfte überwiegen und sich – auf
demokratischem Wege – durchsetzen."

S N

unread,
Mar 4, 2010, 10:02:09 AM3/4/10
to
Thanks for the very valuable advise. I shall consider the same.
However, can someone guide me if there is there somthing related to
Fonts.charset values related to this issue.


"Timo Kunze" <TKunz...@gmx.de> wrote in message
news:%23ThySFw...@TK2MSFTNGP05.phx.gbl...


> Am 03.03.2010 16:31, schrieb S N:
>> Can someone advise me on one of the free solutions for the problem
>> indicated
>> earlier.
>
> On my website I provide free Unicode controls that can replace most of
> the VB6 controls.
>
> Timo
> --
> www.TimoSoft-Software.de - Unicode controls for VB6
> "Those who sacrifice freedom for safety deserve neither."
> "Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der

> �berzeugung, dass die demokratischen Kr�fte �berwiegen und sich - auf
> demokratischem Wege - durchsetzen."


S N

unread,
Mar 4, 2010, 10:10:52 AM3/4/10
to
I hope the free controls on your website support indic languages like Hindi.

"Timo Kunze" <TKunz...@gmx.de> wrote in message
news:%23ThySFw...@TK2MSFTNGP05.phx.gbl...

> Am 03.03.2010 16:31, schrieb S N:
>> Can someone advise me on one of the free solutions for the problem
>> indicated
>> earlier.
>
> On my website I provide free Unicode controls that can replace most of
> the VB6 controls.
>
> Timo
> --
> www.TimoSoft-Software.de - Unicode controls for VB6
> "Those who sacrifice freedom for safety deserve neither."
> "Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der

Timo Kunze

unread,
Mar 4, 2010, 1:22:13 PM3/4/10
to
Am 04.03.2010 16:10, schrieb S N:
> I hope the free controls on your website support indic languages like
> Hindi.

Should be no problem as long as you use an adequate font. The controls
are thin COM wrappers around the Windows native controls, so if there're
problems with Hindi, it's likely that the native controls have the same
problems.

Timo
--
www.TimoSoft-Software.de - Unicode controls for VB6
"Those who sacrifice freedom for safety deserve neither."
"Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der

S N

unread,
Mar 5, 2010, 11:20:55 AM3/5/10
to
Actually the native controls dont support Hindi. When we type in the native
controls in Hindi language, it just shows ???? characters.
That is why i want to use a unicode enabled control.

"Timo Kunze" <TKunz...@gmx.de> wrote in message

news:ubZgUe8u...@TK2MSFTNGP05.phx.gbl...


> Am 04.03.2010 16:10, schrieb S N:
>> I hope the free controls on your website support indic languages like
>> Hindi.
>
> Should be no problem as long as you use an adequate font. The controls
> are thin COM wrappers around the Windows native controls, so if there're
> problems with Hindi, it's likely that the native controls have the same
> problems.
>
> Timo
> --
> www.TimoSoft-Software.de - Unicode controls for VB6
> "Those who sacrifice freedom for safety deserve neither."
> "Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der

Timo Kunze

unread,
Mar 5, 2010, 1:23:13 PM3/5/10
to
Am 05.03.2010 17:20, schrieb S N:
> Actually the native controls dont support Hindi. When we type in the native
> controls in Hindi language, it just shows ???? characters.
> That is why i want to use a unicode enabled control.

With native controls, you seem to mean the VB6 controls. That's not what
I mean. I mean the native Windows controls - those that are used by the
Windows shell itself. The native Windows controls support Unicode.

Timo
--
www.TimoSoft-Software.de - Unicode controls for VB6
"Those who sacrifice freedom for safety deserve neither."
"Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der

MikeD

unread,
Mar 5, 2010, 7:22:52 PM3/5/10
to

"Timo Kunze" <TKunz...@gmx.de> wrote in message

news:##KUgDJvK...@TK2MSFTNGP04.phx.gbl...


> Am 05.03.2010 17:20, schrieb S N:
>> Actually the native controls dont support Hindi. When we type in the
>> native
>> controls in Hindi language, it just shows ???? characters.
>> That is why i want to use a unicode enabled control.
>
> With native controls, you seem to mean the VB6 controls. That's not what
> I mean. I mean the native Windows controls - those that are used by the
> Windows shell itself. The native Windows controls support Unicode.
>

For clarity's sake, let's use the term "intrinsic" for VB controls and
"native" for Windows controls.

I've always believed (never had a need yet to have to use unicode in VB, so
I have practical experience and am more/less just guessing at all of this)
that the problem with using unicode in VB's intrinsic controls wasn't with
the control itself. After all, VB creates them from Windows' native
controls (VB's TextBox is actually Windows' Edit control). That's why you
can change styles and send EM_ messages and respond to messages via
subclassing. The "problem" is VB itself: it converts unicode to ANSI (or
vice-versa as the case may be). So, when you assign a unicode string to a
Textbox's Text property, VB converts that string to ANSI. I would guess that
if you *solely* use the API with VB's intrinsic controls, you might be able
to utilize unicode.


--
Mike

Timo Kunze

unread,
Mar 5, 2010, 7:44:39 PM3/5/10
to
Am 06.03.2010 01:22, schrieb MikeD:
> For clarity's sake, let's use the term "intrinsic" for VB controls and
> "native" for Windows controls.

"Intrinsic" was the word I was looking for, thank you (English isn't my
native language).

> I've always believed (never had a need yet to have to use unicode in VB,
> so I have practical experience and am more/less just guessing at all of
> this) that the problem with using unicode in VB's intrinsic controls
> wasn't with the control itself. After all, VB creates them from
> Windows' native controls (VB's TextBox is actually Windows' Edit
> control). That's why you can change styles and send EM_ messages and
> respond to messages via subclassing. The "problem" is VB itself: it
> converts unicode to ANSI (or vice-versa as the case may be). So, when
> you assign a unicode string to a Textbox's Text property, VB converts
> that string to ANSI. I would guess that if you *solely* use the API with
> VB's intrinsic controls, you might be able to utilize unicode.

You're on the right track. Under the hood, the intrinsic controls indeed
are native controls. BUT: As you probably know, you can create ANSI
windows and Unicode windows. ANSI windows are created through
CreateWindowExA and have an ANSI message handling routine (e. g.
DefWindowProcA). Unicode windows are created through CreateWindowExW and
have a Unicode message handling routine (DefWindowProcW).
VB6 creates ANSI windows, that's the main reason why it doesn't support
Unicode and why it won't work to make an intrinsic control support
Unicode. My controls create Unicode windows.

To make this topic more complicated: Internally, Windows creates all
windows as Unicode windows. But it does string conversion for the ANSI
versions of the API functions. So while each window actually is a
Unicode window, those that have been created through the ANSI versions
of the API functions, are presented as ANSI windows.

0 new messages