Solved

How to get printer settings of default printer in C#?

Posted on 2006-11-16
3
2,727 Views
Last Modified: 2008-01-09
Hi,

   I am working on page setup form in my application. How can i get user's default printer settings? i need to show page sizes in a combo box..

Thanks
Bekir Karadeniz
0
Comment
Question by:BekirKaradeniz
[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
3 Comments
 
LVL 15

Accepted Solution

by:
ozymandias earned 125 total points
ID: 17958775
// create a print dialog which will be initilaised with default printer
PrintDialog pd = new PrintDialog();
// get the printer settings and get the papersizes
// iterate throught the available paper sizes and add them to your combobox
foreach(PaperSize p in pd.PrinterSettings.PaperSizes){
      comboBox1.Items.Add(p.PaperName);
}
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

636 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