Microsoft KB Archive/97639

{|
 * width="100%"|

-

The information in this article applies to:


 * Microsoft FoxPro for Windows, version 2.5
 * Microsoft FoxPro for MS-DOS, versions 2.0, 2.5

-

SYMPTOMS
The first EJECT command issued after a printer driver is assigned is not sent to the output destination.

RESOLUTION
To correct this problem in the program shown below, include the following code in the program that uses the EJECT command after the printer driver has been assigned: 

  SET TALK OFF X=SET(&quot;PRINTER&quot;,1) SET PRINTER TO JUNK.TXT EJECT SET PRINTER TO &X

STATUS
Microsoft has confirmed this to be a problem in FoxPro versions 2.0 and 2.5 for MS-DOS. This problem was corrected in FoxPro version 2.5a for MS-DOS.

MORE INFORMATION
The following code will reproduce this problem: 

  * This section of code reproduces the problem in JUNK.TXT, because * a printer driver was set.

SET PDSETUP TO  SET PRINTER TO JUNK.TXT EJECT EJECT SET PRINTER TO

* This section of code works correctly, because the printer driver * was not set again.

SET PRINTER TO NEWJUNK.TXT EJECT EJECT SET PRINTER TO After a printer driver is chosen, the first EJECT command executed will not send a formfeed character to the output destination. The file JUNK.TXT demonstrates this problem, as it contains only one formfeed character.

Any time a second EJECT command is executed after the first EJECT command is executed without changing the printer driver, a formfeed character will be sent to the output destination. The file NEWJUNK.TXT demonstrates this behavior, as it contains two formfeed characters.

Without a default printer driver or a printer driver loaded, both files will always work correctly and contain two formfeed characters. Additional query words: FoxDos FoxWin form feed buglist2.00 buglist2.50 fixlist2.50a

Keywords         : FxprgGeneral Version          : 2.50    | 2.00 2.50 Platform         : MS-DOS WINDOWS Issue type       :
 * }