Difference between ChrW in VB6 and ChrW in vb.net 2005?

Hi

I have a problem with ChrW i vb.Net 2005. It seems that the ChrW behaves differently in vb.Net than in vb6.

In vb.Net I have a toolbox control (in this case called AxWillettPrinter1), to which I pass some unicode characters, with the help of ChrW command:
AxWillettPrinter1.FeedBufferMultiLingual(e.name.ToString, ChrW(&H660) & ChrW(&H661) & ChrW(&H662) & ChrW(&H663) & ChrW(&H664) & ChrW(&H665))

I do exactly the same in vb6 (here the toolbox control is called BP):
BP.FeedBufferMultiLingual("Buffer1", ChrW(&H660) & ChrW(&H661) & ChrW(&H662) & ChrW(&H663) & ChrW(&H664) & ChrW(&H665))

The funny thing is that vb6 do exactly as expected, but in vb.net I only see what appears to be an empty string.

Could anyone clarify this for me?

TIA
VernagerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ArkConnect With a Mentor Commented:
try Convert.ToChar
0
 
supersugarCommented:
It should be same.

try replace your text with something else.

AxWillettPrinter1.FeedBufferMultiLingual(e.name.ToString,"ABCDEF")
I believe empty string appears as well..
0
 
VernagerAuthor Commented:
Hi

I have now tried to put in
AxWillettPrinter1.FeedBufferMultiLingual(e.name.ToString,"ABCDEF")

and it comes out just fine.
0
 
supersugarConnect With a Mentor Commented:
Could it be the component you use doesn't support unicode?
try to put in chinese/japanese charater if it show correctly.
0
 
VernagerAuthor Commented:
The problem was at a different place. You could say that the component did not support unicode.
0
All Courses

From novice to tech pro — start learning today.