-
September 26th, 2005, 11:32 AM
#1
Screen size independent forms?
Hello Friends,
I want to make my vb Forms Screen Size Independent! (This may be the oldest problem.)
I have been designing my forms in 800X600 screen resolution. (You might have anticipated my problem!) When they are displayed in another screen resolution they don't look the same as before.
I have designed a module for that problem in the follwing manner.
1. Two constants hold designed screen's height & witdth
2. I compare new screen's height & width with designed screen's
height & width If they differ each other I will calculate the
percetage of difference.
3. Next looping through each control on the form I will chage
Left ,Top ,Height & Width of each control accoding to the
percentage of difference which was calculated in above step.
This routine is doing well, except for the follwing problems.
Especially when switching to lower resolution.
1. Label Controls are not displaying complete caption unless I set
their AutoSize property to true again in the above module. Which
may not be desireble for every Label on the form.
2. Combo boxes with a little bigger font size are not getting smaller
height ( ofcourse this is even true in design mode!) Causing
missproporation.
3. There is also problem with Icons size which are being set
through ImageList control.
When I am switching to higher resolution the result is quite satisfactory.
My intention is actually the designed forms must be able to work in lower resolution.
So kindly help me with a professional quality solution!
-
September 26th, 2005, 01:01 PM
#2
Re: Screen size independent forms?
 Originally Posted by KittiAnand
I have been designing my forms in 800X600 screen resolution. (You might have anticipated my problem!) When they are displayed in another screen resolution they don't look the same as before.
...
When I am switching to higher resolution the result is quite satisfactory.
My intention is actually the designed forms must be able to work in lower resolution.
So kindly help me with a professional quality solution! 
I have always used the rule of thumb for designing GUIs that they should be designed in the lowest resolution you expect to use. So if you expect the lowest resolution to 640x480 then design your forms for that resolution. As you pointed out, when you go to higher resolutions resizing doesn't affect your form's appearance, but you get some distortions if you try to shrink the resolution for smaller screens. By designing forms in the lowest resolution allowed, you insure that your forms will appear the same regardless of the user's screen resolution.
Death is life's special way of telling you you're fired.
For I do not seek to understand in order to believe, but I believe in order to understand. For I believe this: unless I believe, I will not understand. - Anselm of Canterbury (1033–1109)
-
September 26th, 2005, 04:40 PM
#3
Re: Screen size independent forms?
I've seen some examples posted that scale the font in much the same manner as the controls, so that everything looks similar to your design-time layout. Here is an example to scale the controls, which you may already have seen/are using: http://www.codeguru.com/forum/showth...570#post999570
The entire thread also deals with fonts on different machines, so it is a good read anyway.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
-
September 27th, 2005, 12:42 AM
#4
Re: Screen size independent forms?
Thanks to both of you (NatThoelecke & WizBang ). I will try your solutions, most probably they work.
Thank you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
On-Demand Webinars (sponsored)
|