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

  • Thread starter Thread starter Fred Nelson
  • Start date Start date
F

Fred Nelson

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
 
* "Fred Nelson said:
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?
 
Back
Top