Link to home
Start Free TrialLog in
Avatar of g_johnson
g_johnsonFlag for United States of America

asked on

printing using the print dialogue

I'm trying to learn how to print using the print dialogue from VB.Net 2005

My biggest and current problem is how to over-ride the margins, such as using something akin to a "page setup" feature.  I don't see that in the print dialogue.

Currently, using code like this:

    Private Sub mDoc_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles mDoc.PrintPage
        Dim xPos As Single = e.MarginBounds.Left
        Dim yPos As Single = e.MarginBounds.Top
        Dim lineHeight As Single = mFont.GetHeight(e.Graphics)
        Static l As Integer
        Dim intCt As Integer
    End Sub

(which I "borrowed" from someone here on EE   :-)  )

my documents have a 1 1/2 " margin at the top and about 1 1/4" margin to the left.
So apparently that's the default for the printer.

How can I use some kind of page setup feature to over-ride those and also, but not as important, to set font choices, etc.?

Thanks
SOLUTION
Avatar of maralans
maralans

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DEEPESH
DEEPESH

Any comment on it g_johnson
Avatar of g_johnson

ASKER

Hi, Deepesh.  Unfortunately, as so often happens, I haven't had a chance to test yet.  Now the computer involved is "down."  I will get to it, though.  I'm sure the comments here are valid but I need to do a comprehensive test.  Thanks for your patience.
Please leave this open if you can.  I am juggling many projects right now and have not had a chance to try these solutions.
sorry it took so long -- i had to force myself to test things last night.
Thanks -- I have a much better understanding of it now.