Logo

Hacker’s Guide to Visual FoxPro
An irreverent look at how Visual FoxPro really works. Tells you the inside scoop on every command, function, property, event and method of Visual FoxPro.

PRINTSTATUS(), Sys(13)

These commands are of no use in Visual FoxPro, because they always return the same value.

Usage

lRetValue = PRINTSTATUS( )
lcRetVal = SYS( 13 )

In FoxPro for MS-DOS, PRINTSTATUS() usefully returns .T. or .F., and SYS(13) returns “READY” or “OFFLINE,” depending on whether your printer is truly ready or not. Under DOS, you needed to have control of things like the printer status, to keep the dreaded “Abort, Retry, Ignore” messages from obnoxiously popping up and destroying your screen. Under Windows, we let Windows worry about these things. Using FoxPro 2.x Windows or Mac, and under Visual FoxPro for Windows, this function lies and returns .T. or “READY” for backward compatibility.

Example

IF PRINTSTATUS()      && okay to print...
IF SYS(13) = "READY"  && okay to print...

See Also

APrinters(), GetPrinter(), PrtInfo(), Set Printer, Sys(1037)