Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Set Default Printer - PLEASE HELP

Posted on 2003-02-27
4
Medium Priority
?
457 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
  • 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

580 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