|
-
Feb 1st, 2004, 09:22 AM
#1
Thread Starter
Junior Member
Printing problem...help
I'm trying to print Rectangle,and everything works fine,but I don't 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
-
Feb 1st, 2004, 03:03 PM
#2
Addicted Member
the PrinterSettings property of your PrintDocument (printDoc)
-
Feb 1st, 2004, 05:54 PM
#3
Thread Starter
Junior Member
Originally posted by WALDO
the PrinterSettings property of your PrintDocument (printDoc)
Still not working,there's no error message and no changes...
Please send me the code that works,if possible
Thanks
-
Feb 2nd, 2004, 04:46 AM
#4
Can't you use e.MarginBounds in your subroutine to set the margins to what you want?
This world is not my home. I'm just passing through.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|