ss7thirty
Well-known member
The VB6 Printer Object contains Name,Port, Driver as properties. I find it hard to believe that .NET would drop functionality from VB6. how do I obtain this information in .NET 2.0? Here is some code:
I am printing a crystal report object and would like to have the user be able to select a printer and print to that printer. Am I stuck forcing them into PrintDialog to get those three things i need (name, port, driver)? If so that is ok I have just not even found a way to do it with PrintDialog as well.
Simply put I need get Port and DriverName of a printer. I posted a similar thread but was asking more about the CrystalReport object than just about getting this info from .NET. Because I am still not sure what that function is expecting.
VB.NET:
Private Sub PopulatePrinters()
For Each strPrinter As String In System.Drawing.Printing.PrinterSettings.InstalledPrinters
cbPrinters.Items.Add(strPrinter)
Next
cbPrinters.Text = GetDefaultPrinterName()
End Sub
I am printing a crystal report object and would like to have the user be able to select a printer and print to that printer. Am I stuck forcing them into PrintDialog to get those three things i need (name, port, driver)? If so that is ok I have just not even found a way to do it with PrintDialog as well.
Simply put I need get Port and DriverName of a printer. I posted a similar thread but was asking more about the CrystalReport object than just about getting this info from .NET. Because I am still not sure what that function is expecting.