VB.NET Setting the form size

  • Thread starter Thread starter Bill S.
  • Start date Start date
B

Bill S.

Hey,

Can anybody tell me how to set the size of my form to inches, or the
equivalent? I want the size of the main form to be 8.5 x 11 inches (the same
size as a sheet of paper) when the application starts. It seems Microsoft
has changed everything with the VB.NET. Everything is in pixels now!

Thanks for any help!
 
Hi,


The graphics class dpix and dpiy will give you pixels per inch.

Dim gr As Graphics = Me.CreateGraphics

Me.Size = New Size(New Point(gr.DpiX * 8.5, gr.DpiY * 11))



Ken

------------------------

Hey,

Can anybody tell me how to set the size of my form to inches, or the
equivalent? I want the size of the main form to be 8.5 x 11 inches (the same
size as a sheet of paper) when the application starts. It seems Microsoft
has changed everything with the VB.NET. Everything is in pixels now!

Thanks for any help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top