Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "SetDefaultPrinter" in [All]

winspool

.

    public static extern bool SetDefaultPrinter(string Name);

.

Declare Function SetDefaultPrinter Lib "winspool.drv" Alias "SetDefaultPrinterA" (ByVal pszPrinter As String) As Boolean

.

    result = SetDefaultPrinter(defaultPrinterName);

.

I tried this in a little test solution and now I have a magical method SetDefaultPrinter which you can use natively. There’s also methods for pretty much everything you can do to a Windows printer.

.
Documentation
[SetDefaultPrinter] on MSDN

 
Access PInvoke.net directly from VS: