-
May 23rd, 2010, 07:47 PM
#1
filter printers based on model
I am using C#.
I display installed printers in the combo box using the below code. How do i filter only the printers model and just display those models in the combo box? Please help me. I am new to c# development.
PrintDocument prtdoc = new PrintDocument();
string strDefaultPrinter = prtdoc.PrinterSettings.PrinterName;
foreach (String strPrinter in PrinterSettings.InstalledPrinters)
{
comboBox1.Items.Add(strPrinter);
if(strPrinter == strDefaultPrinter)
{
comboBox1.SelectedIndex = comboBox1.Items.IndexOf(strPrinter);
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|