PRB: RichTextBox Control Saves Locale Setting When Created
This article was previously published under Q189480 On This PageSYMPTOMS
Text entered into a RichTextBox control at run-time uses a keyboard layout
that is different than the current setting.
CAUSE
When the RichTextBox control was initially added to the form, the then-
current keyboard setting was saved with the text in the text property of
the control.
RESOLUTION
There are several possible workarounds depending on the version of the
control you are working with. With version 6.0 of the control there are two workarounds:
Step-by-Step Example
STATUS
This behavior is by design. The RichTextBox control saves the language
setting when text is saved.
MORE INFORMATION
When a RichTextBox control is added to a form, default text is added to the
text property. When the form is saved the RTF data format includes the
keyboard settings as part of the font information. Version 6.0 of the control does not save the keyboard setting if the text property of the control is empty. Previous versions of the control saved the setting regardless of the contents of the text property. The keyboard (Locale) setting can be changed in Control Panel/Regional Settings. REFERENCES
Online Help for Microsoft Visual Basic, versions 4.0 and 5.0 Books Online for Microsoft Visual Basic 5.0 and 6.0 APPLIES TO
| Article Translations
|

Back to the top
