Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get the name of the default printer?
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00235120
Message ID:
00239732
Views:
25
George,

Hi! I'm using the US ST. Fanfold Paper size and the two Epson Printer have different constant for this paper size. Epson LQ1170 is size 39 while Epson LQ2170 is size 286. I see this on the expr field of my reports. so I use the set('PRINTER',2) function like this:
cDefPrinter = SET('PRINTER',2)
IF cDefPrinter = "Epson LQ-1170 ESC/P 2"
....
RUN MY REPORT (SETUPED IN LQ-1170/US ST. FANFOLD PAPER SIZE IN THE
REPORT DESIGNER)
ELSE
RUN MY REPORT (SETUPED IN LQ-2170/US ST. FANFOLD PAPER SIEZ IN THE
REPORT DESIGNER)
ENDIF

This is working but if the user changed the name of the LQ1170 printer in Windows 95 (Start/Properties/Printers), my first condition will fail. What I want is how to get the printer name / type directly from the printer / registry not just the printer name from Windows 95 (SET('PRINTER',2)).

Thanks again.

Charlotte
>>George,
>> I have another question. Set('PRINTER',2) works perfectly well. But I have a code that check if the default printer is equal to "default printer name" then I'll do something. But if the user changed the printer name in the Windows95 Printer properties..., I got a problem :(.
>>
>> How can I get the default printer name or ID no directly from the printer and not from Windows 95. This is because the printer name in the Windows 95 can be modified.
>>
>>Thanks,
>>
>Hi Charlotte,
>
>I'm not exactly certain that I understand the problem, but I'll give it a shot. Anytime the user changes the default printer, Windows should notify all open applications, so I don't think that this is anything to worry about. Or am I missing something?
Charlotte M. Nulud
Analyst / Programmer
Banco Filipino Savings & Mortgage Bank
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform