Buon pomeriggio,mi aiutate a correggere l'errore non riesco a stampare il form corrente ma mi fa stampare solo una porzione di scermo forse non devo usare il metoto graphic? allego il codice grazie
Public Class Form1
Dim g, NG As Graphics
Dim bmp As Bitmap
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
e.Graphics.DrawImage(bmp, 0, 0)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
g = CreateGraphics()
bmp = New Bitmap(Size.Width, Size.Height, g)
NG = Graphics.FromImage(bmp)
NG.CopyFromScreen(Location.X, Location.Y, 0, 0, Size)
'NG.CopyFromScreen(Location.X, Location.Y, 0, 0, Size)
PrintPreviewDialog1.ShowDialog()
End Sub
End Class