Solved

Printer Definitions

Posted on 2011-09-19
5
175 Views
Last Modified: 2012-05-12
I am designing a program where I want the user to be able to define their own printer definitions, so they will select a printer, have the option of launching the default properties dialog or specify their own values such as paper size orientation etc.

I then want to call a program such as word, run a mail merge and pass in a user defined printer definition, is this possible and does anyone have any resources available for it?
0
Comment
Question by:rocky050371
  • 3
5 Comments
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 36559662
0
 

Author Comment

by:rocky050371
ID: 36559933
Thanks, I really need the ability to define printer definitions on top of this.
0
 
LVL 15

Expert Comment

by:x77
ID: 36560623
CodeProject: Changing printer settings using C#

http://www.codeproject.com/KB/dotnet/NET_Printer_Library.aspx

I do´n like this.
It Change the DeviceMode to a specific Printer.

Note that you can go to Printer Folder, Double-Click on any Printer an Change Default Properties for printer.
Also you can Call This Dialog for any Printer From you Vb code.
You Can do it executint RunDll:

      %windir%\system32\rundll32.exe Printui.dll,PrintUIEntry /o /n PrinterName

Or you can use methods Declared on  Printui.dll from your code.
0
 
LVL 15

Expert Comment

by:x77
ID: 36560873
Printui Doc

Note That you can:

   /Ss Store printer settings into a file
   /Sr Restore printer settings from a file
0
 
LVL 15

Expert Comment

by:x77
ID: 36560968
You can configure the Printer and then save the Printer settings to a file:

Store all printer settings into a file:
RUNDLL32 PRINTUI.DLL,PrintUIEntry /Ss /n "printer" /a "file.dat"

Then from Your Program you can restore it Executing:
RUNDLL32 PRINTUI.DLL,PrintUIEntry /Sr /n "printer" /a "file.dat"

Note that Printer is the Printer Name.

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now