?
Solved

Set Default Printer - PLEASE HELP

Posted on 2003-02-27
4
Medium Priority
?
447 Views
Last Modified: 2013-12-26

Does anyone know how to set a printer as the default printer within the application without prompting the user and without getting it from the registry?

are there any dll's out there that I could use?

Any help appriciated!!

THANKS :)
0
Comment
Question by:MrSUNG
[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
4 Comments
 
LVL 5

Accepted Solution

by:
buasuwan earned 100 total points
ID: 8039049
PB8 has some printer functions,
PrintGetPrinter(), PrintGetPrinters(), PrinterSetPrinter().

If you use PB5-7, here are 2 links about how to change printer.

http://www.sybase.com.cn/cn/content/support/exp_jszc_pb_General_00008.htm

http://webforums.sybase.com/nntp/nd000007.nsf/85255e6f0052055e85255d7f005ed8bc/113b6e622a1a5d093800476abf8ec9c2?OpenDocument
0
 

Author Comment

by:MrSUNG
ID: 8039249
buasuwan,

Using PB 7.

Thanks for the links, but i'm looking for an alternative method to getting and setting the registry.

Regards,
MrSUNG

0
 
LVL 5

Expert Comment

by:buasuwan
ID: 8040209
sorry,

here is for your information.
http://www.developer.com/net/cplus/article.php/640491
0
 

Expert Comment

by:tpadilha
ID: 8102725
On Win9X, you can get the printers list by registry or by win.ini.

To get it on WIN.INI, you can get the printer names on registry and with this information, search WIN.INI using ProfileString ("C:\Windows\WIN.INI","Devices","Printer name from registry") and set device option (printer name, printer driver, printer port) on windows section with SetProfileString function. On open and read this system profile, you see the correct sintaxe to set printer.


If you need any sample to get and set it on registry or on WIN.INI, ask for!

TPADILHA.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

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