Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Changing the Font codepage
Hello all.

I have an application that needs to display it's forms and controls captions
in many different languages (including Engilsh, Gr and Bulgarian).
This needs to be done without changing the system's "Language for non
unicode programs" setting.

So I change the Font.Charset property runtime, for each control contained
into the form and for the form itself. This works fine for some controls (eg
.
Label, Textbox) but some others (eg. CommandButton) do not display the
correct codepage although their Font property accepts it. The same applies t
o
the form itself where the caption and the menu elements are not displayed
with the correct codepage

Is there any way to overcome this behaviour?

Code Sample:


Public Sub TranslateForm(ByRef frmMyForm as Form)

Dim fnt As Font
Dim ctrl As Control

set fnt = frmMyForm.Font
fnt.Charset = 204 'eg Cyrillic
set frmMyForm.Font = fnt

'Code that changes the form's caption for the selected
'language goes here

For Each objControl In frmMyForm.Controls

Set fnt = ctrl.Font
fnt.Charset = 204 'eg Cyrillic
Set ctrl.Font = fnt

'Code that changes the control's caption for the selected
'language goes here

Next objControl

End Sub

Any help or hint would be greatly appreciated!

Report this thread to moderator Post Follow-up to this message
Old Post
Strider
05-30-05 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Visual Basic archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:39 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.