FaxMan Jr
IsPrinterInstalled Property
Example 




Return True if a printer with the same PrinterName is installed.
Syntax
'Declaration
 
Public ReadOnly Property IsPrinterInstalled As Boolean
'Usage
 
Dim instance As FaxPrint
Dim value As Boolean
 
value = instance.IsPrinterInstalled
public bool IsPrinterInstalled {get;}
public: __property bool get_IsPrinterInstalled();
public:
property bool IsPrinterInstalled {
   bool get();
}

Property Value

True if Printer is Installed
Remarks
This property can be queried prior to installing a printer. This example looks to see if the printer is installed. If not it will install the printer driver. If Not FaxPrint1.IsPrinterInstalled Then System.Windows.Forms.MessageBox.Show("Installing Printer for First Time use", FaxPrint1.PrinterName) If (FaxPrint1.InstallPrinter("")) Then System.Windows.Forms.MessageBox.Show("Printer Installed.", FaxPrint1.PrinterName) Else System.Windows.Forms.MessageBox.Show("Printer Failed to Install.", FaxPrint1.PrinterName) End If Else System.Windows.Forms.MessageBox.Show("Printer already Installed.", FaxPrint1.PrinterName) End If
Example
This example looks to see if the printer is installed. If not it will install the printer driver.
If Not FaxPrint1.IsPrinterInstalled Then		System.Windows.Forms.MessageBox.Show("Installing Printer for First Time use", FaxPrint1.PrinterName)		If (FaxPrint1.InstallPrinter("")) Then			System.Windows.Forms.MessageBox.Show("Printer Installed.", FaxPrint1.PrinterName)		Else			System.Windows.Forms.MessageBox.Show("Printer Failed to Install.", FaxPrint1.PrinterName)		End If	Else		System.Windows.Forms.MessageBox.Show("Printer already Installed.", FaxPrint1.PrinterName)	End If
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

FaxPrint Class
FaxPrint Members
PrinterName
InstallPrinter

Send Feedback