Also was ihr braucht!
>1PictureBox(Mit Bild), >1PrintDocument, >1PrintDialog, >1Button(Oder anderes)
Ein klick auf den Button1 und der Druckvorgang beginnt!
Und der Code:
Hoffe ich konnte euch helfen!
>1PictureBox(Mit Bild), >1PrintDocument, >1PrintDialog, >1Button(Oder anderes)
Ein klick auf den Button1 und der Druckvorgang beginnt!
Und der Code:
VB.NET-Quellcode
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- If PrintDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
- PrintDocument1.PrinterSettings = PrintDialog1.PrinterSettings
- PrintDocument1.Print()
- End If
- End Sub
- Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, _
- ByVal e As System.Drawing.Printing.PrintPageEventArgs) _
- Handles PrintDocument1.PrintPage
- e.Graphics.DrawImage(PictureBox1.Image, 0, 0)
- End Sub
Hoffe ich konnte euch helfen!