Platforms to show: All Mac Windows Linux Cross-Platform
Back to WindowsPrinterMBS class.
WindowsPrinterMBS.DeletePrinterConnection(name as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Printing | MBS Win Plugin | 12.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
name: The name of the printer connection to delete.
Returns true on success and false on failure.
This is a blocking or synchronous function and might not return immediately. How quickly this function returns depends on run-time factors such as network status, print server configuration, and printer driver implementation—factors that are difficult to predict when writing an application. Calling this function from a thread that manages interaction with the user interface could make the application appear to be unresponsive.
The DeletePrinterConnection function does not delete any printer driver files that were copied to the server to which the printer is attached.
WindowsPrinterMBS.GetDefaultPrinter as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
For more details on the GetDefaultPrinter function, check this website:
http://msdn.microsoft.com/en-us/library/dd144876(VS.85).aspx
Returns an empty string on any error.
Some examples using this method:
WindowsPrinterMBS.OpenPrinter(PrinterName as string, admin as boolean = false) as WindowsPrinterMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Printing | MBS Win Plugin | 12.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Admin: whether you want to get permissions to administrate.
Returns nil on any error.
WindowsPrinterMBS.SetDefaultPrinter(PrinterName as string) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Returns a Windows error code. (0 for success)
For details on the Windows SetDefaultPrinter method, check here:
http://msdn.microsoft.com/en-us/library/dd162971(VS.85).aspx
The items on this page are in the following plugins: MBS Win Plugin.