You should be able to whip up your own printer dialog box that retains the last printer selected (using aprinter()). The dialog could easily return a value to indicate that a cancel button was pressed.
FYI: The following code, along with Rick Strahl's registry class (in the files section) will get you the current Windows default printer name for comparison with the results of aprinter():
#DEFINE HKEY_LOCAL_MACHINE -2147483646
set proc to registry.prg
oRegistry=CREATE("Registry")
DIMENSION taVals[1,2]
lnVals=oRegistry.GetEnumValues(@taVals,HKEY_LOCAL_MACHINE,;
"Config\0001\System\CurrentControlSet\Control\Print\Printers")
? 'Default printer is: ', taVals(1,2)
>Does anyone have a way to determine the printer that is FoxPro's current printer?
>I know about GETPRINTER() but I do not want to bring that up. And I know about SET('PRINTER',2), but that always returns the WINDOWS DEFAULT printer.
>
>Is there any way to get the VFP current printer, since it may have been changed from the WINDOWS DEFAULT?
kenweber
GCom2 Solutions
Microsoft Certified Professional