473,378 Members | 1,321 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,378 software developers and data experts.

VB.NET Setting the form size

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

Similar topics

3
by: Claire | last post by:
A couple of questions I have a progress form, if the form user wants to display an extra line of text then they call the following { frmProgress f = new frmProgress(); f.SetLabel("Hello");
1
by: Rodrigo Ferreira | last post by:
In my project i create a form in runtime when i click in a button. The problem consists in the form size. I put this lines: frmCalculadora.FormBorderStyle =...
3
by: MG | last post by:
It appears that VS.NET limits the size of a web form to the size of your screen based on the resolution of the machine it's running on. Is there a way to make the size of a web form larger than the...
4
by: Woody Splawn | last post by:
I don't mean to be too wordy but if you will indulge me a moment I need to get something clear in my mind. I am concerned about the size of my forms. I am concerned that if I put too much code in...
3
by: raj | last post by:
hi, I have 4 forms all having 40 fields in datagrid,I have two textBoxes for date and country, according to my requirement if i have set date and country in one form then if i go to another form...
1
by: campbellbrian2001 | last post by:
Thanks in advance to anyone who can tell me how to programmatically keep a user from changing a form size. I need to do this in code rather than from the properties menu. Thanks!
14
by: Galen Somerville | last post by:
My current screen resolution is set to 1024 x 768. My form size always comes up as 1032 x 748. I have tried the help sample ' Retrieve the working rectangle from the Screen class ' using the...
7
by: greg.merideth | last post by:
I inherited a vs2003 project which I've converted into vs2005 to run under .net 2.0. The conversion was fine and the project compiles and runs just fine until today. A user called me up asking...
1
by: igalep132 | last post by:
Hey all, I was trying to resize control size to the form size. I'm changing my form size according to current Screen Size by using Screen.PrimaryScreen.WorkingArea; and then I'm making a...
2
by: =?Utf-8?B?VGVycnk=?= | last post by:
Hope someone has some ideas - this is driving me nuts, I am using VS2008 and have a tightly layed out form at 8 pts. The form has a font dialog and when the user changes the font size, everything...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.