?
Solved

Setting anchoring for windows form

Posted on 2009-07-02
6
Medium Priority
?
238 Views
Last Modified: 2012-05-07
Hello,

I have a windows form in VB.net 2008. On this form I have placed two group control - one on the top and the other below that. Each Group control has one graph control. Now when I resize the form vertically i.e. increase height at run-time, I want that both group controls should equally resize so that both graph will also equally resize. What should I set the Anchor property for the Group Controls? The Dock property of the graph control is set to Fill so that it occupies complete space of the group control.

Regards.
MI
0
Comment
Question by:vj_mi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24763550
Try setting the anchor to "top, bottom".
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24763567
You may find that the groups overlap each other in which case you could use the form_resize event to set the location and size of the controls based on current size of the form.
0
 

Author Comment

by:vj_mi
ID: 24764274
Form_resize event: I cannot use this since at run-time the user will resize the form based on the client's screen resolution. Manaully setting the size/psotion will be very tedeious since the both group controls are within one tab page and there are other controls on other tab page. Any other alternative?

Regards,
MI
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24764369
Did you try using the "top, bottom" as Anchor value?
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 24764551
"Any other alternative?"

For keeping things of equal size, use the TableLayoutPanel.  It should just have two rows with a size of percent and 50.  Place your groupbox/graph into each cell with Dock set to fill.
0
 

Author Comment

by:vj_mi
ID: 24764833
>>>"top, bottom" as Anchor value?
I tried that but then the top group control overlaps with the bottom group control.

I will try what Idle_mind suggested and will post the results.

Regards,
MI
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question