Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

default printer

Status
Not open for further replies.

kitnba

MIS
Joined
Jul 31, 2000
Messages
132
Location
HK
How can I easy to get the default printer name at VFP 3/6 ?
 
I only get the printer port, can I get the full name of the default printer?

anyway thanks
 
From the MSDN (SET() function):

PRINTER ON or OFF
PRINTER, 1 FileName or PortName
PRINTER, 2 Default Windows printer name
PRINTER, 3 Default Visual FoxPro printer name
(specified in the Visual FoxPro Print or Print Setup dialog boxes)


HTH,
Weedz (Wietze Veld)
My private project:CrownBase source code can be downloaded !!
 
You can use the APRINTERS() function - it stores the printer info into an array. The name is in column 1 and the port is in column 2.

Using this in combination with SET("PRINTER", x) and ASCAN() you should be able to get what you want.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top