>I am displaying a form asking the user to select a printer with GetPrinter(). I want to set this choice to the system default printer, how can I accomplish this ?
Hi Kenny:
Seems to me that SET('Printer') by itself returns the windows default printer, and SET('Printer,2') or SET('Printer,3') returns the currently selected VFP-6 printer name (as WIndows sees it from the name of the printer icon as installed on the current PC workstation).
You can then invoke SET PRINTER TO NAME (xxxxxx) (do not enclose the actual name in quotes -- but you might need to monkey with enclosing the returned name inside of parantheses if it has any embedded spaces in the name itself) to set the VFP printer to the one you want. Some quick testing from the command window should show you how it works.
Remember, this does not change the Windows default printer, just the one that VFP uses. To change the Windows default printer for all applications you will need to manipulate the registry. I think there is something in FAQ or FILES section on that. Personally, I try to avoid mucking with the registry unless there is an overwhelming need...
HTH
Rob
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only