Can anyone tell me how to find system's default printer name using c#.Net 2.0 code?
How to find system's default printer name using c#.Net 2.0 code?
Try this code................
public static string DefaultPrinterName()
{
string functionReturnValue = null;
System.Drawing.Printing.PrinterSettings oPS = new System.Drawing.Printing.PrinterSettings(...
try {
functionReturnValue = oPS.PrinterName;
}
catch (System.Exception ex) {
functionReturnValue = "";
}
finally {
oPS = null;
}
return functionReturnValue;
}
imperial
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment