PRB: Random Character Appears in Screen Text

Last reviewed: April 29, 1996
Article ID: Q107611
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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 29, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.