By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,691 Members | 1,131 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,691 IT Pros & Developers. It's quick & easy.

VB.NET Setting the form size

P: n/a
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!
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

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

"Bill S." <ws*******@comcast.net> wrote in message
news:7J********************@comcast.com...
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!

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.