By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,041 Members | 965 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,041 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
* "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.