Different Screen Resolutions Question

We have users with varying screen resolution settings. For example…

Bob’s screen is set at 800 x 600
Mike’s is at 1024 x 768
Suzie’s is at 640 x 480

My app is designed for 800 x 600

How can I
a) programatically recognize their screen resolution
b) adjust the sizing of all the Windows in the app to work with that resolution

This would be specifically for those with a 640 x 480 setting (some users vision isn’t as good as most)

Thanks for any help.

Use

Screen(0).Height

and

Screen(0).Width

These give you the working screen height and width.

You can use several approaches. One is to design every window in several resolutions. Then you switch according to the screen resolution in your app. Or you store every control position in a array and move it according to the resolution. It is more work, but you can adjust more precisely the controls for a better looking UI.

The other approach is to use dynamic placement for your controls. I am attaching a small project that demonstrate ways of obtaining this. The TextArea is locked on all sizes in the inspector, so it changes size and placement according to the size of the window. The buttons are placed at a percentage of the window, so when the window changes size, they remain at the same proportion leftwise and topwise. The proportion is measured in the Open event of the window, and buttons are moved according to the new screen resolution in the nudgebuttons method.

screens.xojo_binary_project

Rick don’t open multiple posts in different categories as we have been answering you on this thread.

https://forum.xojo.com/11304-different-screen-resolutions-question

https://www.dropbox.com/s/q3c54xmtggic7qf/ScreenWindowTest.xojo_binary_project

From my other 5 posts. :slight_smile:

Ah, the double post issue. I did not notice it way is customer service :frowning:

I forgot that issue was still lingering :slight_smile: Thanks Michel.