Solved

Changing Default Printer

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Convert Jpg /PNG To GIF 5 135
add combobox item based on numbers 9 143
Working with hours 3 58
Embarcadero C++ builder XE10.1 Berlin find In files dialogue stunted display 4 32
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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

773 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