To get the default printer name in C# and VB.NET you can use the following snippet.
Samples
Sample C#
public string GetDefaultPrinter() { PrinterSettings settings = new PrinterSettings(); return settings.PrinterName; }
Sample VB.NET
Public Function GetDefaultPrinter() As String Dim settings as PrinterSettings = New PrinterSettings() Return settings.PrinterName End Function
If you have any questions or suggestions feel free to rate this snippet, post a comment or Contact Us via Email.
Related links:
RT @CodeSnippetsNET: How to get the default printer name in .NET: http://t.co/JMA0Mip8DF #csharp #vb #dotnet
How to get the default printer name in #csharp and #VB #DOTNET -> https://t.co/RJzzUR5JPZ
RT @CodeSnippetsNET: How to get the default printer name in #csharp and #VB #DOTNET -> https://t.co/RJzzUR5JPZ
RT @CodeSnippetsNET: How to get the default printer name in #csharp and #VB #DOTNET -> https://t.co/RJzzUR5JPZ
RT @CodeSnippetsNET: How to get the default printer name in #csharp and #VB #DOTNET -> https://t.co/RJzzUR5JPZ