I am doing my own PrintDialog, and have placed there a combo with the
printer names, as in the PrintDialog provided by VB.NET.
Here is the question: how do I open the native windows printer dialog
for the current printer, so that my current
PrintDocument.P rinterSettings will be set according to the User choices
?
Thanks
-Pamela
My question in code. Assume you have ceated a MyPrintDialog
form with a combo box "ComboBoxPrinte rNames" listing the printers and a
button "ButtonSelected PrinterProperti es"
to set the current printer properties.
---------------------------------------
Private Sub ButtonSelectedP rinterPropertie s_Click(ByVal sender As
System.Object, ByVal e As System.EventArg s) Handles
ButtonSelectedP rinterPropertie s.Click
Me.PrintDocumen t.PrinterSettin gs.PrinterName =
Me.ComboBoxPrin terNames.Select edText
If Not Me.PrintDocumen t.PrinterSettin gs.IsValid Then
MsgBox("Invalid printer", MsgBoxStyle.Inf ormation)
Exit Sub
End If
Me.OpenPrinterP ropertiesDialog (PrintDocument)
End Sub
Sub OpenPrinterProp ertiesDialog(By Val PrintDocument As
PrintDocument)
' ???????? my question: how to open the windows dialog for
setting PrintDocument.P rinterSettings
End Sub
--------------------------------------------
printer names, as in the PrintDialog provided by VB.NET.
Here is the question: how do I open the native windows printer dialog
for the current printer, so that my current
PrintDocument.P rinterSettings will be set according to the User choices
?
Thanks
-Pamela
My question in code. Assume you have ceated a MyPrintDialog
form with a combo box "ComboBoxPrinte rNames" listing the printers and a
button "ButtonSelected PrinterProperti es"
to set the current printer properties.
---------------------------------------
Private Sub ButtonSelectedP rinterPropertie s_Click(ByVal sender As
System.Object, ByVal e As System.EventArg s) Handles
ButtonSelectedP rinterPropertie s.Click
Me.PrintDocumen t.PrinterSettin gs.PrinterName =
Me.ComboBoxPrin terNames.Select edText
If Not Me.PrintDocumen t.PrinterSettin gs.IsValid Then
MsgBox("Invalid printer", MsgBoxStyle.Inf ormation)
Exit Sub
End If
Me.OpenPrinterP ropertiesDialog (PrintDocument)
End Sub
Sub OpenPrinterProp ertiesDialog(By Val PrintDocument As
PrintDocument)
' ???????? my question: how to open the windows dialog for
setting PrintDocument.P rinterSettings
End Sub
--------------------------------------------
Comment