1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim doc As New PrintDocument
Dim pagesetup As New PageSetupDialog
With pagesetup
.Document = doc
.ShowDialog(Me)
End With
With Me.TextBox4
.Text = doc.PrinterSettings.PrinterName & vbCrLf
.Text = .Text & "Nb de copies : "
doc.PrinterSettings.Copies.ToString(vbCrLf)
.Text = .Text & "Assemblees : " '&
doc.PrinterSettings.Collate.ToString(vbCrLf)
.Text = .Text & "Couleur : " '&
doc.DefaultPageSettings.Color.ToString(vbCrLf)
.Text = .Text & "Orientation : " '&
IIf(doc.DefaultPageSettings.Landscape.ToString, "Paysage", "Portrait") 'vbcrlf
.Text = .Text & "Format : " '&
doc.DefaultPageSettings.PaperSize.ToString() '(vbCrLf)
End With
End Sub |
Partager