Solved

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

Posted on 2010-09-09
5
758 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB.Net - Project Software to help the Developer 7 33
.net and XML report from SCCM 5 20
Automatic Email Reminder 4 36
Error handling in asp.net site 5 24
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

785 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