Solved

Changing Default Printer

Posted on 1997-04-20
3
169 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

771 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

10 Experts available now in Live!

Get 1:1 Help Now