468,110 Members | 1,885 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,110 developers. It's quick & easy.

Left & Right Margin Setting - System.Drawing.Printing.PrintPageEventArgs

I'm a newby and I'm writing my first VB.NET print program!

I need to change the default left and right margins for my printed output

"e" is my "System.Drawing.Printing.PrintPageEventArgs

By Default: e.PageSettings.Margins.Left = 100 and
e.PageSettings.Margins.Right=750

I have written code to set the values however
e.PageSettings.MarginBounds.Left = 20 and is ignored, when I read from it I
get the original values.

The interesting thing is that if I use the values in my write operation:
e.drawings.graphics.drawstring it works!

So there might not be a problem - however I want to be sure since this
program will be used with many different windows drivers.

Any help would be appreciated

Thanks,

Fred

Nov 20 '05 #1
1 4225
* "Fred Nelson" <fr**@smartybird.com> scripsit:
I need to change the default left and right margins for my printed output

"e" is my "System.Drawing.Printing.PrintPageEventArgs

By Default: e.PageSettings.Margins.Left = 100 and
e.PageSettings.Margins.Right=750

I have written code to set the values however
e.PageSettings.MarginBounds.Left = 20 and is ignored, when I read from it I
get the original values.
Even if you assign the value and read it directly after assigning it?
The interesting thing is that if I use the values in my write operation:
e.drawings.graphics.drawstring it works!


What does 'DrawString' have to do with margins?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Rainbow | last post: by
2 posts views Thread by John Smith | last post: by
19 posts views Thread by ashkaan57 | last post: by
reply views Thread by > Adrian | last post: by
1 post views Thread by jake | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.