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

Proportional Forms

In the plant, we have monitors that range in size, and we force our
application to be full screen.

The font for the screen has been designed for 800x600 screens, which is the
smallest size resolution that we use here.

However, whenever someone runs the form on a monitor that has the resolution
set higher (like 1600x1200), the text is too small to be read from a distance.

Is there a simple way to tell the application to fit the screen width
without having to go into each control and setting the fonts for them all?

Thanks,
Joe
Using Visual Studio 2005
Oct 1 '08 #1
11 2510
On Oct 1, 6:37*pm, jp2msft <jp2m...@discussions.microsoft.comwrote:
In the plant, we have monitors that range in size, and we force our
application to be full screen.

The font for the screen has been designed for 800x600 screens, which is the
smallest size resolution that we use here.

However, whenever someone runs the form on a monitor that has the resolution
set higher (like 1600x1200), the text is too small to be read from a distance.

Is there a simple way to tell the application to fit the screen width
without having to go into each control and setting the fonts for them all?

Thanks,
Joe
Using Visual Studio 2005
Well, at first thought, you can determine current computer's screen
size and if it's larger than 800x600 then increase the font size to a
reasonable level by instantiating a new font object of the controls
like this on form_load event:

'----------------------------
' Use Screen Class for that purpose
For Each ctrl As Control In Me.Controls
If Screen.PrimaryScreen.Bounds.Height.ToString 600 _
AndAlso Screen.PrimaryScreen.Bounds.Width 800 Then
' eg: If larger than 800x600, increase Button's font size to 25
ctrl.Font = New Font("Arial", 25)
End If
Next
'---------------------------

Hope this works,

Onur Güzel
Oct 1 '08 #2
On Oct 1, 6:54*pm, kimiraikkonen <kimiraikkone...@gmail.comwrote:
On Oct 1, 6:37*pm, jp2msft <jp2m...@discussions.microsoft.comwrote:
In the plant, we have monitors that range in size, and we force our
application to be full screen.
The font for the screen has been designed for 800x600 screens, which isthe
smallest size resolution that we use here.
However, whenever someone runs the form on a monitor that has the resolution
set higher (like 1600x1200), the text is too small to be read from a distance.
Is there a simple way to tell the application to fit the screen width
without having to go into each control and setting the fonts for them all?
Thanks,
Joe
Using Visual Studio 2005

Well, at first thought, you can determine current computer's screen
size and if it's larger than 800x600 then increase the font size to a
reasonable level by instantiating a new font object of the controls
like this on form_load event:

'----------------------------
' Use Screen Class for that purpose
For Each ctrl As Control In Me.Controls
If Screen.PrimaryScreen.Bounds.Height.ToString 600 _
AndAlso Screen.PrimaryScreen.Bounds.Width 800 Then
' eg: If larger than 800x600, increase Button's font size to 25
ctrl.Font = New Font("Arial", 25)
End If
Next
'---------------------------

Hope this works,

Onur Güzel
I want to make addition related to my previous post, however it would
also be possible to just increase Form's Font size because when done
it applies on all the controls on the form and you wouldn't worry for
the controls' size-fitting problems because of new enlarged font.

So, you can also consider:
'----------------------------
' Use Screen Class for that purpose
If Screen.PrimaryScreen.Bounds.Height.ToString 600 _
AndAlso Screen.PrimaryScreen.Bounds.Width 800 Then
' eg: If larger than 800x600, increase Button's font size to 20
' Referring current form instance
Me.Font = New Font("Arial", 20)
End If
'---------------------------

BTW, don't forget that when you increase form's font size, form's own
size also will be bigger depending on the font size value you
specified.

Onur Güzel
Oct 1 '08 #3
Hello Joe, hello Onur,

When changing the font size, please keep in mind that not all controls
have the AutoSize function (e.g. TextBox controls). Therefore you would
have to change the size of that control yourself. You also would have to
rearrange the controls accordingly as labels (which have AutoSize) would
change their size and destroy your layout.
>The font for the screen has been designed for 800x600 screens, which is the
smallest size resolution that we use here.
Maybe you should consider to buy new monitors which could display about
1280x1024. If you designed your application for that resolution you
would have no problem with 1600x1200.

Best regards,

Martin
Oct 1 '08 #4
"Martin H." wrote:
Maybe you should consider to buy new monitors which could display about
1280x1024. If you designed your application for that resolution you
would have no problem with 1600x1200.
Hah! Yeah, right. Try telling that one to management! The monitors they have
out there are all 10 to 20 years old. Only after management upgrades their
computers and monitors do the machines out on the floor get updated - and
then, they only get the old PC that was replaced!
Oct 1 '08 #5
Your answer is correct, but actually I want the application to fit the
screen, not just a way to increase the font size.

Microsoft's 'premier software development platform' should have an option
that allows a Software Developer to specify that a form must keep its overall
proportions no matter what size the screen or form is.

For example: Flash files resize easily to fit their containers while keeping
their proportions. I'm interested to know if MS has anything similar that I
don't know about.

"kimiraikkonen" wrote:
Well, at first thought, you can determine current computer's screen
size and if it's larger than 800x600 then increase the font size to a
reasonable level by instantiating a new font object of the controls
like this on form_load event:

'----------------------------
' Use Screen Class for that purpose
For Each ctrl As Control In Me.Controls
If Screen.PrimaryScreen.Bounds.Height.ToString 600 _
AndAlso Screen.PrimaryScreen.Bounds.Width 800 Then
' eg: If larger than 800x600, increase Button's font size to 25
ctrl.Font = New Font("Arial", 25)
End If
Next
'---------------------------

Hope this works,

Onur Güzel
Oct 1 '08 #6
On 2008-10-01, jp2msft <jp*****@discussions.microsoft.comwrote:
Your answer is correct, but actually I want the application to fit the
screen, not just a way to increase the font size.

Microsoft's 'premier software development platform' should have an option
that allows a Software Developer to specify that a form must keep its overall
proportions no matter what size the screen or form is.

For example: Flash files resize easily to fit their containers while keeping
their proportions. I'm interested to know if MS has anything similar that I
don't know about.
WPF :)

--
Tom Shelton
Oct 1 '08 #7
WPF is Visual Studio 2008, right?

If yes, ...rats.

"Tom Shelton" wrote:
WPF :)
Oct 1 '08 #8
On 2008-10-01, jp2msft <jp*****@discussions.microsoft.comwrote:
WPF is Visual Studio 2008, right?

If yes, ...rats.

"Tom Shelton" wrote:
>WPF :)
2005 with the the extensions:

http://downloads.zdnet.co.uk/0,10000...328336s,00.htm

MS has pulled the official download page though. This requires framework 3.0
(which is 2.0 with WCF, WF, and WPF added).

--
Tom Shelton
Oct 1 '08 #9
MS has pulled the official download page though. *This requires framework 3.0
(which is 2.0 with WCF, WF, and WPF added).

--
Tom Shelton
Yes, MS doesn't host these WPF extensions anylonger officially. Maybe
they found some compatiblity issues or problems related to extensions
with 2005 and they decided to force people to download VS 2008... :-)

Thanks,

Onur Güzel

Oct 2 '08 #10
On 2008-10-02, kimiraikkonen <ki*************@gmail.comwrote:
>
>MS has pulled the official download page though. *This requires framework 3.0
(which is 2.0 with WCF, WF, and WPF added).

--
Tom Shelton

Yes, MS doesn't host these WPF extensions anylonger officially. Maybe
they found some compatiblity issues or problems related to extensions
with 2005 and they decided to force people to download VS 2008... :-)

Thanks,

Onur Güzel
They still support the Workflow extensions. I think the main problem is these
never got out of ctp... and now that 2005 is the "old" version they decided
not to go futher.

--
Tom Shelton
Oct 2 '08 #11
On Oct 1, 10:37 am, jp2msft <jp2m...@discussions.microsoft.comwrote:
In the plant, we have monitors that range in size, and we force our
application to be full screen.

The font for the screen has been designed for 800x600 screens, which is the
smallest size resolution that we use here.

However, whenever someone runs the form on a monitor that has the resolution
set higher (like 1600x1200), the text is too small to be read from a distance.

Is there a simple way to tell the application to fit the screen width
without having to go into each control and setting the fonts for them all?

Thanks,
Joe
Using Visual Studio 2005
Perhaps this will help you:

http://msdn.microsoft.com/en-us/libr...05(VS.80).aspx

Chris
Oct 2 '08 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Headless | last post by:
I've marked up song lyrics with the <pre> tag because it seems the most appropriate type of markup for the type of data. This results in inefficient use of horizontal space due to UA's default...
2
by: Danny | last post by:
All, SQL Server uses a proportional fill method to add data to file groups where a file group has multiple files. In general this is a good thing. Unfortunately, the method appears to get...
258
by: Terry Andersen | last post by:
If I have: struct one_{ unsigned int one_1; unsigned short one_2; unsigned short one_3; }; struct two_{ unsigned int two_1;
3
by: Joshua Russell | last post by:
Hi, Both the methods below open up a windows form called MasterForm. However, one works better than the other. Method 1 opens the form correctly but I don't have any reference to the instance of...
0
by: Tina | last post by:
I need to do some left alignment in code and I need to use a fixed space (nonproportional) font. I know that Courier is such a font, but what other fonts are also non proportional. How can I tell...
7
by: Mike Bulava | last post by:
I have created a base form that I plan to use throughout my application let call the form form1. I have Built the project then add another form that inherits from form1, I add a few panel controls...
3
by: Lloyd Sheen | last post by:
I have the following situation: Need a user resizable user control. After much trying with user control I came across the idea of hosting the controls in a form marked as not TopLevel = false. ...
1
by: petermichaux | last post by:
Hi, I have been experimenting with some textarea automatic resize scripts. Most that I have found count the number of characters in the textarea and divide by the number of columns. This works...
3
by: Andrew Hayes | last post by:
In a C#.NET web page, I'm using the GridView control bound to a ObjectDataSource and the binding and data reading works fine. It auto generates the columns from the SelectMethod and makes the drid...
3
by: watashi | last post by:
Hello, I have 3 things to consider here, one is source image, form and picture box. My picture or image on the form must be proportional in size to the original image.This image on form...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.