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

anchoring, docking and screen resolution

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

Nov 21 '05 #1
1 1223
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.

"Ahmed" wrote:
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

Nov 21 '05 #2

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

Similar topics

6
by: Lecture Snoddddgrass | last post by:
Greetings, Can anyone recommend a good 3rd party docking windows component for WinForms? I'm looking for something that allows windows to not only be docked but to "popout", much like the...
3
by: Mad Joe | last post by:
Hi! I have a window form that contains 4 elements (2x2) on one panel. Those 4 elements are GroupBoxes of the exact same size, sorted like this: groupBox1 groupBox2 groupBox3 groupBox4 ...
3
by: Colt Ramsden | last post by:
How would I go about docking my main form to the side of the left side of the screen, ala Trillian or Desktop Sidebar, where any other maximized apps will only maximize to the docked form's left...
5
by: Maxi | last post by:
I have a 30X16 cells table in my html page. Table height and width are set to 100%. I have set size of every cell inside the table to 24 pixel. When I open the html page in maximize state in...
9
by: Steve Wright | last post by:
Hi I'm developing a webpage that needs to include a different stylesheet depending on the screen resolution. I know that I could read the resolution in javascript and then do some sort of...
2
by: Matt Brown - identify | last post by:
Hello, I've spent the better part of the day going over code and thinking and have come up with the following docking method that works perfectly. At this point, my brain is about to explode...
3
by: marfi95 | last post by:
My application consists of basically a treeview on the left side, along with a panel control that takes up the right side. When nodes are clicked on the left, the data on the right side of the...
1
by: sklett | last post by:
I've read several articles/blogs/threads about anchoring/docking child controls in a FlowLayoutPanel. It sounds like it *should* work, but I can't get it to work for the life of me. Jon Skeet: ...
1
by: nasima khan | last post by:
Hi, i am nasima. I have got a code for setting the screen resolution of my page, but i am unable to understand. Can any one give a complete data explanation of the below code. Sub ChangeRes(X...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.