Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Changing Default Printer

Posted on 1997-04-20
3
Medium Priority
?
181 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 100 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

610 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