Solved

Changing Default Printer

Posted on 1997-04-20
3
170 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

929 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now