Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 18th, 2004, 09:03 AM
Registered User
Join Date: May 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Displaying Chinese in a TextBox

Can anyone help me resolve a little problem.

I'm trying to open a txt file in a TextBox. This works fine with a text file that contains English characters. However when I try to open a file containing Chinese characters nothing gets displayed (I've put in an error message that tells me its 'Out of Memory', which isn't true as the file contains two characters). I've tried using a normal TextBox and also a RichTextBox but still the same thing happens.

My system locale is set to Chinese so any other application displays Chinese characters correctly, it's just these TextBoxes that don't.

I'm guessing theres a problem with the encoding somewhere but it's beyond me.

Please help.


Reply With Quote
  #2 (permalink)  
Old May 19th, 2004, 11:59 AM
Friend of Wrox
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts

try to set the text.Font.Charset = 134 (that is CHINESESIMPLIFIED_CHARSET) and select a font that support that charset like
text.font.name = ChrW(&H5B8B) + ChrW(&H4F53)
is that a unicode text file? how do you read the file and display it? what happens if you try to display something in chinese besides reading from a file?

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying text in textbox Europom Excel VBA 4 March 31st, 2007 06:28 AM
I'm chinese ChinaWolf C# 3 January 23rd, 2006 04:32 AM
Displaying Data in TextBox From Database(Urgent) gadhiav ASP.NET 1.0 and 1.1 Basics 2 June 17th, 2004 12:20 AM
Displaying Data in Textbox from Database(URGENT) gadhiav Classic ASP Databases 1 June 16th, 2004 02:06 AM

All times are GMT -4. The time now is 10:17 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.