Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 328351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:29:14+00:00 2026-05-12T09:29:14+00:00

please help me. I want to print some reports from .NET app. I read

  • 0

please help me. I want to print some reports from .NET app.
I read how to use PrintDocument class and Graphics object to draw my report.
But i don`t know which units are used in methods, for example:

Protected Overrides Sub OnPrintPage(ByVal e As System.Drawing.Printing.PrintPageEventArgs)
    MyBase.OnPrintPage(e)

    Dim g As Graphics = e.Graphics
    g.PageUnit = GraphicsUnit.Millimeter
    Dim p As New Pen(Brushes.Red, 5)
    g.DrawRectangle(p, 5, 5, g.VisibleClipBounds.Width - 10, g.VisibleClipBounds.Height - 10)

End Sub

in method:

Public Sub DrawRectangle(ByVal pen As System.Drawing.Pen, ByVal x As Single, ByVal y As Single, ByVal width As Single, ByVal height As Single)

parameters x,y,width,height are in pixels,millimeters,inches or what?

I try to find answer on google but founded nothing.
I am completely confused.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T09:29:14+00:00Added an answer on May 12, 2026 at 9:29 am

    Check the PageUnit property.

    http://msdn.microsoft.com/en-us/library/system.drawing.graphics.pageunit.aspx

    which could be any one (except World) of these:

    http://msdn.microsoft.com/en-us/library/system.drawing.graphicsunit.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please, suggest me some libraries that will help me print PDF files that contain
Please help me i am having some trouble. What i want to do is
For some reason I cannot use functions attached to the object I want to
please help me. I want know about what types of flags to run an
Can somebody please help me, I want to put the OK symbol throw HTML
Could someone please help me in here, I'm just a beginner who want to
Hi i want to upload mulitiple file using rails 3 and paperclip please help
I want to add background image to uinavigationcontroller. Please help me.
i Want to fetch this data using json decode. Please Help.. So far i
Desperate, please help. Will work for food :) I want to be able to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.