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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printer List, default printer 1

Status
Not open for further replies.

jester4281

IS-IT--Management
Sep 12, 2002
160
US
Is there a way to generate a list of all printers on a machine, similiar to listing drives on a machine. I am looking to change the default print from within my application, then when the users exits, I will have it set it back to the previous default printer.
 
Your code generates errors, on the CREA CUR, I tried CREATE CURSOR and it still gives an syntex error
 
How would i get that into a control box. I tried

lnNo = APRINTERS(lAPrinters)

IF lnNo > 0
APPE FROM ARRAY laPrinters ;
INTO CURSOR printer_list
ENDI

Thisform.combo1.rowsource = 'printer_list'
 
I got the .Rowsource things, wasnt worried about that, but you forgot one little thing "Printer_list.name" that is for anyone else who needs it.
 
Quick thing how can i test for the current default printer ?
 
One more thing, how do I set the default from within application.

I tried

SET PRINTER TO DEFAULT printername

But no go.
 
Hey Chris,

I really like your FAQ for "The answer to getting answered". Do you mind if I copy it, tailor it to the forums I usually visit, and use it myself?

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
dgillz

From the end of the FAQ -

'This FAQ was originally created as a TIP by fluteplr in Thread183-68247. Several other forum members contributed to the TIP. This FAQ was originally posted in SQL server by
Terry Broadbent And a special thanks to johnwm for his editing skills.

I have unashamedly borrowed and modified it for the VFP forum. Thanks to Strongm, Zemp and Lovell811 for their input to improve it. - mgagnon'

A number of us use it in our signatures in this forum - I cannot see that there would be any objection from Mike Gagnon or anyone else provided the credits above were included. [smile]


FAQ184-2483 - the answer to getting answered.​
Chris [pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top