Solved

Changing Default Printer

Posted on 1997-04-20
3
173 Views
Last Modified: 2010-04-04
I wish to know how to set either of my two printers to default from within a Delphi 2 program.
I have a Sharp JX-9210 Laser and a Epson Stylus Color 600
and am using Windows 95
0
Comment
Question by:kennys
  • 2
3 Comments
 
LVL 2

Expert Comment

by:gysbert1
ID: 1335546
Why do you want to change the default printer ??

Isn't it beter practice to pop up a printer dialog and let the user select the printer ??
0
 
LVL 2

Accepted Solution

by:
gysbert1 earned 50 total points
ID: 1335547
Changing the following value in the registry will work:

HKEY_LOCAL_MACHINE\Config\0001\System\CurrentControlSet\Control\Print\Printers

Use the TRegIniFile class to get the values to see how they
should look, and set the values to whatever...

I still think its better to pop up a printersetupdialog though...
0
 

Author Comment

by:kennys
ID: 1335548
Thanks
I needed to change printer defaults as one of my two printers
conflicts with my scanner and must not be set to default. I wished to choose through a Delphi program.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question