Wrox Programmer Forums
|
BOOK: Visual Basic 2005 Programmer's Reference
This is the forum to discuss the Wrox book Visual Basic 2005 Programmer's Reference by Rod Stephens; ISBN: 9780764571985
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Visual Basic 2005 Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 17th, 2007, 04:51 AM
Authorized User
 
Join Date: Jan 2006
Posts: 43
Thanks: 1
Thanked 0 Times in 0 Posts
Default Resolution Independent screen design

Hi,
Is there anyway to design my form so that it adjust the controls to the screen resolution.

i heard that some third party controls are available, but im not sure to use the Anchor property. because the the Textbox is stretched only by width and not height.

thanks


 
Old April 17th, 2007, 08:48 AM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

This is a tough issue. It's very hard to come up with a solution that works for all sizes and resolutions, particularly when you throw in the fact that user may select large fonts.

I would try using Anchor and other properties such as Dock. A TextBox in single-line mode won't change its height but if you anchor the controls below it to Top/Left/Right/Bottom, they will stay with TextBox on the top and get taller when the form gets taller.

It's easiest if you have one control that can take up any extra space. For example, if you have a bunch of data entry fields at the top and then a big DataGridView taking up the rest of the form, the DataGridView can grow to fill up any extra space.

I think most applications that worry about this only really work on a couple of sizes. There's a "normal" size, a maximized size, and usually not too many others.

There are a few more thoughts at:

    http://www.vb-helper.com/tutorial_sizing_forms.html

But as I said, it's a tough problem.


Rod
RodStephens@vb-helper.com

Check out my latest book:
"Expert One-on-One Visual Basic 2005 Design and Development"
http://www.vb-helper.com/one_on_one.htm

Sign up for the free VB Helper Newsletters at http://www.vb-helper.com/newsletter.html





Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen Resolution ajeesh_online C# 1 June 14th, 2006 12:37 AM
Resolution Independent Site. rupen Classic ASP Basics 6 September 22nd, 2005 06:49 PM
screen resolution Adam H-W Classic ASP Basics 3 October 13th, 2004 09:13 PM
screen resolution miguel.ossa C# 2 October 9th, 2004 11:58 PM
screen resolution mistry_bhavin Pro VB.NET 2002/2003 0 March 13th, 2004 02:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.