UCase$/LCase$ in Text Box Change Event Inverts Text Property (84059)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 2.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
- Microsoft Visual Basic Standard Edition for Windows 1.0
This article was previously published under Q84059 SUMMARY
When using the UCase$ or LCase$ functions in Microsoft Visual Basic
for Windows to capitalize text or make text lower case from within the
change procedure of a text box, you may encounter unexpected results if
the following conditions are true: - The text property of the text box is being updated by the UCase$ or
LCase$ statement.
- The resulting string created by UCase$ or LCase$ is assigned to the
text property of the text box.
- The above statements appear in the Change event procedure of the
text box.
Every time a key is pressed, the text contents are changed, and the
cursor is placed at the beginning of the line. This causes the
character for your next key press to be inserted at the beginning of
the line rather than the end.
Modification Type: | Major | Last Reviewed: | 12/12/2003 |
---|
Keywords: | KB84059 |
---|
|