K. Ravinder Reddy

Hi all,

I want to display all available Fax machines and Printers installed on my machine in a dropdown box and based on the selection of one item, that selected printer or fax should become the default printer to my machine. How can I do this by using C#.

Please help me out.

Thanks and Regards

Ravinder Reddy K



Re: Visual C# General How to find the available Fax and printers through C# application

Karthikeya Pavan Kumar .B

Import System.Drawing.Printing namespace in your application.

Add a DropDownList and change its name to printersList and write this below code on Form's load event handler.

private void Form1_Load (object sender, System.EventArgs e)

{

foreach (String printer in PrinterSettings.InstalledPrinters)

{

printersList.Items.Add (printer.ToString());

}

}

The DropDownList will show all printers available on your network.






Re: Visual C# General How to find the available Fax and printers through C# application

K. Ravinder Reddy

Thank you Karthikeya. Then what about FAX machines and after selecting one printer how can I make it as the default printer



Re: Visual C# General How to find the available Fax and printers through C# application

Karthikeya Pavan Kumar .B

check this link for printers..http://www.c-sharpcorner.com/UploadFile/DipalChoksi/WindowsFormPrinterSelectionList11222005002533AM/WindowsFormPrinterSelectionList.aspx

I don't have idea about fax machine