Microsoft KB Archive/107611

{| = PRB: Random Character Appears in Screen Text =
 * width="100%"|

ID: Q107611

2.50 2.50a 2.50b WINDOWS kbprg kbprb

The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5, 2.5a, and 2.5b -

SUMMARY
When you execute an .SPR file, a random character appears at the end of a text object placed in the screen. If you open the screen .SCX file, no character is visible at the end of the text string.

CAUSE
When you are creating a text object in the Screen Builder and you press the RETURN key at end of the line, a carriage return is inserted at the end of the text string. When the .SPR file is executed, a random character appears at the end of the line. This behavior occurs only when a carriage return character appears at the end of a single line of text.

RESOLUTION
To remove the unwanted character:

1. Select the Text ("A") tool in the toolbox.

2. Place the cursor at the end of the text string.

3. Press the DEL key.

4. From the Program menu, choose Generate.

MORE INFORMATION
Pressing the ENTER key at the end of a text object embeds the carriage return character within the line. When the .SPR program is run, the font style selected for the line of text will attempt to display the carriage return character on the screen. The font tries to map the carriage return to the closest possible display character.

Steps to Reproduce Behavior
1. Create a screen called TEST.SCX.

2. Select the Text ("A") tool in the toolbox.

3. Place the cursor in the middle of the screen and type "This is a Test"

and press the ENTER key. Note that the carriage return character is not visible at the end of the line. 4. Select the text object. 5. From the Object menu, choose Font. In the Font dialog box, select MS San

Serif, Bold, and 24 points. 6. Generate the screen. 7. In the Command window, type the following:

DO test.spr Note that a solid black rectangle appears preceding the final character of text. The type of character that appears at the end of the text string depends on the object's font. Additional reference words: FoxWin 2.50 2.50a 2.50b char KBCategory: kbprg kbprb KBSubcategory: FxtoolSbuilder

Keywords         : FxtoolSbuilder Version          : 2.50 2.50a 2.50b Platform         : WINDOWS
 * }