GetPrinters Method
|
Part | Description
|
PrinterCount | (Optional). Variant (Integer) expression that returns the number of printers found.
|
|
ReturnAsDelimitedString | (Optional). Boolean expression specifying whether the printer names should be returned as an array or as a pipe (|) delimited string (default is False, which specifies that printer names are returned in an array).
|
|
HP DeskJet 690C
|
FAX Printer
|
PDF Printer Driver
|
Dim RDP As RawDataPrinter.Printer
|
Private Sub Form_Load()
|
Dim MyPrinters As Variant, I As Integer, PrnCount As Integer
|
|
'Get the names of installed printers into an array
|
MyPrinters = RDP.GetPrinters(PrnCount)
|
|
'Populate the combo box with the names
|
For I = 0 To PrnCount - 1
|
Combo1.AddItem MyPrinters(I)
|
Next
|
|
'Select the first printer name to show in the combo text
|
Combo1.ListIndex = 0
|
End Sub
|
|
|
Private Sub CommandPrint_Click()
|
'Print data to the selected printer
|
RDP.PrintRawData ("Printed using Raw Data Printer!", , Combo1.List(Combo1.ListIndex))
|
End Sub
|
|