I am converting a large program from VB6 to C#. One of the problems I've run into is the VB6 program uses the old Kodak Imaging Control. I've not been able to find anything inexpensive to replace it with so I have got it running in the C# program. The problem is that the print method for the Kodak image control requires the printer name, driver and port. This was not much of a problem in VB6 and I used:
Private Sub cboPrinters_Click()
With frmEView
Set Printer = Printers(cboPrinters.ListIndex)
.gstrPrnName = Printer.DeviceName
.gstrPrnDriver = Printer.DriverName
.gstrPrnPort = Printer.Port
End With
End Sub
This used the Printers collection in VB6. Does anyone know what needs to be done in C# to reveal the printer info. Most of the printers are network printers and usually one local one.
Yippeee! Your solution was just what I needed! And the detail you provided made my job very easy.
Thanks,
-Bob
rturney
ASKER
Thank you very much for the fantastic response to my problem! I am very grateful!
Best regards,
-Bob
horne0268
Thanks TheLearnedOne: for your posting, you just saved my head from being banged against the wall!
Just one thing though, can you think of a reason why the printer status on all my installed printrs are showing a PrinterStatus='Unknown' but when viewed in control panel | printers show as Offline or Ready?
Open in new window