" Live as if you were to die tomorrow. Learn as if you were to live forever.. "
- Mahatma Gandhi

Set default printer using C#.NET [VS 2008]

Posted on November 24th, 2015 by Amrita Dash

Following is the code sample used to set the default printer. We need to add the reference of “System.Management” to the project.   [C#.NET CODE STARTS] // namespace declaration using System.Management; // code sample for setting default printer ManagementObjectCollection objManagementColl; // class used to invoke the query for specified management collection ManagementObjectSearcher objManagementSearch = new […]