Solved

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

Posted on 2010-09-09
5
754 Views
Last Modified: 2013-12-26
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
0
Comment
Question by:Vernager
  • 2
  • 2
5 Comments
 
LVL 1

Expert Comment

by:supersugar
ID: 33634463
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
 

Author Comment

by:Vernager
ID: 33634871
Hi

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

and it comes out just fine.
0
 
LVL 27

Accepted Solution

by:
Ark earned 125 total points
ID: 33670223
try Convert.ToChar
0
 
LVL 1

Assisted Solution

by:supersugar
supersugar earned 125 total points
ID: 33679572
Could it be the component you use doesn't support unicode?
try to put in chinese/japanese charater if it show correctly.
0
 

Author Closing Comment

by:Vernager
ID: 34715892
The problem was at a different place. You could say that the component did not support unicode.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now