Im trying to print Rectangle,and everything works fine,but I dont know how to set page margins. Left margin is always 2milimeters and top is always 17mm. I want printer to start printing on top of the page (closer to the edge of the paper, as much is possible)
I had no problem with this in VB 6.0
Please help.
Private Sub printDoc_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles printDoc.PrintPage
Dim pr As New Pen(Color.Black, 1)
With e.Graphics
.DrawRectangle(pr, 10, 10, 50, 50)
End With
End Sub
I had no problem with this in VB 6.0
Please help.
Private Sub printDoc_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles printDoc.PrintPage
Dim pr As New Pen(Color.Black, 1)
With e.Graphics
.DrawRectangle(pr, 10, 10, 50, 50)
End With
End Sub