Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 18th, 2004, 09:03 AM
Registered User
 
Join Date: May 2004
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.

Thanks.

 
Old May 19th, 2004, 11:59 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

strange.
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?

Marco





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.