dcsimg
Results 1 to 4 of 4

Thread: Printing problem...help

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2004
    Location
    Croatia
    Posts
    23

    Exclamation 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

  2. #2
    Addicted Member WALDO's Avatar
    Join Date
    Aug 2002
    Location
    Swing of Prussia, PA
    Posts
    244
    the PrinterSettings property of your PrintDocument (printDoc)

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2004
    Location
    Croatia
    Posts
    23

    Question

    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

  4. #4
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536
    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
  •  



Featured


Click Here to Expand Forum to Full Width