dcsimg
Results 1 to 2 of 2

Thread: Printing problem in .NET....help

  1. #1

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

    Exclamation Printing problem in .NET....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
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,092
    No need to double post. It is better to keep topics in the appropriate forum.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

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