Italic and Large Fonts Display Poorly in VB Text Boxes

ID Number: Q76555

1.00

WINDOWS

Summary:

Italic letters of any size are incorrectly truncated when typed in a

text box. Also, using the BACKSPACE key to delete characters leaves

pieces of characters when using italic text or large fonts.

This information applies to Microsoft Visual Basic programming system

version 1.0 for Windows. This is a problem with Windows 3.0, not

Microsoft Visual Basic.

More Information:

To work around this problem, you can use the Refresh method during the

text box change event to correctly update the screen. However, this

will also cause some visible flickering as you type characters into

the text box.

Steps to Reproduce Problem

--------------------------

1. Place a large text box on a blank form.

2. Set the text box FontSize property to any size above 12 points,

or set the FontItalic property to True.

3. From the Run menu, choose Start.

4. Type anything in the text box.

5. Press BACKSPACE.

Note: If the font size is large, the font will be displayed correctly

until the characters are removed with the BACKSPACE key. Italic

characters will be displayed incorrectly when entered into the text

box, and backspacing will truncate the deleted characters.

To correct the appearance of the characters in the text box, add the

following code to the text box's Change event.

Sub Text1_Change ()

Text1.Refresh

End Sub

The above code will make the text box update the visual display every

time a change is made, thereby correcting the problem. However, it

will generate a flicker of the text box.

Additional reference words: 1.00 3.00