VB.NET Printing- how to use margins and scales

Posted on 2005-05-04
Medium Priority
Last Modified: 2008-03-06
I have some easy question about printing.
I have a picture to print. I do not want to print it from the corner of the paper so I use
        PrintDocument1.OriginAtMargins = True
        PrintDocument1.DefaultPageSettings.Margins.Left = 200
        PrintDocument1.DefaultPageSettings.Margins.Top = 200

but it does not work ! I put the code in the printPage event and used a PrintPreviewDialog to see what will be printed. My picture appears at the very top left corner.

Another question: How can I convert Inches into pixels and the other way?
I thought 1inch= 79 pixels but it does not seem nearly right.
You can read some info about pixels at: http://www.lowendmac.com/tech/pixels.html
 This is very important in printing.
Maybe the default setting the paperSize.width is 8.5inches!!or is it?
Question by:Dan-Key
1 Comment

Accepted Solution

kouroshparsa earned 500 total points
ID: 13940557

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month15 days, 19 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question