Link to home
Start Free TrialLog in
Avatar of dgb001
dgb001

asked on

-------- HANDLING SCREEN RESOLUTIONS --------

Finally had enough of trying to get a decent third party tool to do the job for me, so does anyone have any good code for handling control resizing for different screen resolutions. I tried all sorts of third party tools, notably Larcom and Youngs, which works fine in development - but thats about all. I cant believe it's so difficult to find a way to do it. Any offers appreciated, any code gratefully recieved. Sorry, not many points - I'm running low.
Thanks in advance,
Dave

Avatar of carlosvs
carlosvs

Do you need to change the form size for different Screen Resolutions.....

use screen control..
Me.Height = Screen.Height
Me.Width = Screen.Width

Avatar of dgb001

ASKER

Well, pretty much any control in the forms and the forms also - ie. you can design your program to look fine in 800*640 resolution but run the same program in 640*400 (or whatever it is) and it'll look like something a mental patient designed. I need something that will act in the form.resize procedure to handle the resizing of the controls and then of course the fonts too, etc, etc, etc. But thanks for your comment anyway.
Dave
Been a lot of discussion on this topic. General consensus is that you *SHOULD NOT* adjust your app to grow proportionally as scree rez changes. This defeats the purpose of going to a higher rez for the user and is perceived as a *BUG*. If I bump up my rez, I want your app to take *LESS* on screen real estate - NOT MORE!

Design your app to look clean at the lowest res you want to support and let it *stay* that size.

M

Avatar of dgb001

ASKER

Thanks Mark, as always a useful comment. Thing is that I designed it at 800*640, which I imagine is most people's default rez, but it looks terrible in low or high rez. Yes, as you say in high rez then it should take up less of the playing field, which is fine by me, but the way Windows "automatically" decides how to adjust the postion of various controls leaves me freaking out - I don't mind having a smaller area of screen, (or larger in low rez) but I still want to have the controls in postions relative to where I created them. I thought of checking for screem rez on program start up and then asking the user if they want to have it changed, or to not continue if they don't - but it doesn't look very professional does it. Any other ideas from you welcome. Thanks, Dave.

I agree with mark2150 (M, I see you will be soon in 'Top 14' area, congrats)

dgb001, to see more arguments *not* to use resizers see
https://www.experts-exchange.com/Q.10102939 (18 points)

ASKER CERTIFIED SOLUTION
Avatar of israelw
israelw

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dgb001

ASKER

Wow, lots of comments - thankyou ameba for your latest - I'll take a look at the Q you suggested. Meanwhile, israelw, that looks like something I could find useful but I'll need to wait until tonight before I can play with it. Can you give a bit of an idea abot scaleheight and scalewidth though, I've never actually used those before - yes, I know this is worth more than 25 points, sorry.
Thanks again,
Dave

Hi Dave!

First, I Need To Tell You That The Screen Object Dosen't Support
the scal's properties but the form object have them.
the scal's properties give you the height and width that you have for your control on the form.
that mean if you have some control i.e. textbox on your form and you want to add anothe label on your space on the form how can you know how space there is on your form?
the scal's properties calculate this and return the NET space on the form

thanks ahead
israelw.

p.s. Sorry,Sorry about my poor english  i'm not american.


You'll find that the controls can be easily scaled, you get into trouble with fonts. There is no metrical relationship between font size and screen size. Additionally the variations of face (bold, ital, roman, etc.) impact the space required. Although you can fairly easily resize the controls, the text will be problematic.

M

Avatar of dgb001

ASKER

Ok israelw, I can understand what you're saying - I actually found some other code also which is proving of use, but I can see that your theory is pretty sound. Mark is right about fonts, but I actually already coded to handle that so when I was playing with some third party controls which didn't work, but yes that would be a problem without adding additional code to handle fonts as well as just resizing controls. Well, thanks everyone for their comments, and thanks again israel (I'm not American either, I'm English, though I work in America, but your English is very reasonable).
Dave