Code Comments
Programming Forum and web based access to our favorite programming groups.Hello all. I have an application that needs to display it's forms and controls captions in many different languages (including Engilsh, Grand 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!
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.