 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Alexander Bauer Guest
|
Posted: Sun Aug 10, 2003 2:40 pm Post subject: Re: Programatically setting Windows default printer |
|
|
Hi,
Try the WinAPI SetDefaultPrinter. It takes the printer name as input
parameter.
The SetDefaultPrinter function sets the printer name of the default printer
for the current user on the local computer.
BOOL SetDefaultPrinter(
LPCTSTR pszPrinter // default printer name
);
I think that's what you are looking for. See the MS Platform SDK for more
information ("Printing and Print Spooler Functions", "Printing and Print
Spooler Reference"). It's available online at
http://msdn.microsoft.com/library/default.asp.
Regards,
Alexander Bauer
"Rhonda Rhames" <rdrhames (AT) comcast (DOT) net> schrieb im Newsbeitrag
news:3f35ad9c$1 (AT) newsgroups (DOT) borland.com...
| Quote: | I need to construct a simple component that will progamatically set the
Windows Default Printer (for any/all print jobs) to specified printer,
without user selection. What is the easiest way to accomplish that?
|
|
|
| Back to top |
|
 |
Yorai Aminov (TeamB) Guest
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|