473,395 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 4861
* "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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: sylvian stone | last post by:
Hi, I'm trying to do something that has always been easy with tables - namely use a three column layout, and above the main layout, show three images - one on the absolute left, one on the absolute...
0
by: DotNetDummy | last post by:
Hi all, I am trying to set the printing setting e.g duplex mode etc. on a default printer when I.E object started printing a particular html doc. Here's the partial code, any help would be...
1
by: Rainbow | last post by:
Hi, I tried to change the print setting by PrintDialog dlg = new PrintDialog(); dlg.AllowSomePages = true; dlg.AllowSelection = true; dlg.Document = pd; dlg.PrinterSettings.MinimumPage = 1;...
2
by: John Smith | last post by:
Hey folks, I'm trying to print from a c# windows application using System.Drawing.Printing. My problem is that it doesn't matter what I put in for papersize, it always ignores what I tell it...
19
by: ashkaan57 | last post by:
Hi, I have a page in a right-to-left language and I am trying to make some bulleted lists using <ul>, but it puts the bullets to the left. Is there any way I can set the bullets to be on the...
0
by: > Adrian | last post by:
Ho can I move the margin to the left by adding which code below? Many thanks, Adrian. ************************** using System; using System.ComponentModel;
1
by: jake | last post by:
When I draw (using DrawString() and other Draw...() methods) directly to the PrintDocument using the PrintDocument's PrintPageEventArgs e, the print-out comes out nice and sharp. But when I direct...
5
by: Timeri | last post by:
This is a bit confusing until you actually see what I'm talking about but the main content of my page is not growing with the right column. I want the main content (left/larger column) to take into...
3
by: Noorain | last post by:
I designed a site. i want to header,footer,left & right column fixed but body information only scrolling. this site screen to be 800/600 px. i designed this way but when i used position fixed all...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.