Solved

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

Posted on 2006-11-16
3
2,673 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
3 Comments
 
LVL 15

Accepted Solution

by:
ozymandias earned 125 total points
Comment Utility
// 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 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

13 Experts available now in Live!

Get 1:1 Help Now