anchoring, docking and screen resolution

A

Ahmed

Hello everyone,

I am designing an application to work with two screen resolutions,
1024x 768 and 800x600. If the user is using a higher resolution the
form should have the same size as 1024x768 screen

I started building the application in 1024x 768 form size but
everything got screwed up when I used the 800x600 screen. So, I decided
to set the size of the form in the design mode to 800x600. The screen
draws fine but I have a lot of empty space specially in the bottom. In
the form, I have a menu at the top, toolbar below it. flyout to the
left and comboboxes, textboxes and labels in the middle.

Any idea what I can do to eliminate that space?

Thanks you in advance,

Ahmed
 
G

Guest

There may be a shorter way, but I use the Screen.PrimaryScreen.Bounds to
determine the size of screen at start-up. You can then calculate the width
and height ratios, i.e., rw=myclientscreenwidth/mydesignscreenwidth and
rh=myclientscreenheight/mydesignscreenheight.

Next, at the start of your application whenever a form is shown, loop thru
all the controls and set their width's to myControl.Width =
rw*myControl.Width and myControl.Height = rh*myControl.Height
You might also want to scale the Fonts for each control as well. Note that
some controls can't be scaled or do not have fonts so you should skip these
in your loop.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top