Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 19th, 2010, 02:03 AM
Friend of Wrox
Points: 608, Level: 9
Points: 608, Level: 9 Points: 608, Level: 9 Points: 608, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: St. Louis, , .
Posts: 100
Thanks: 0
Thanked 1 Time in 1 Post
Default Dynamic Resizing of Form Elements Relative to Form Shape in C#

What is the magic that makes components cling to the edges of a form?

I had thought that one must use the resize event of the form and them force each element in the form to resize.

But then I saw some sample code which, even when I am editing the form, the elements seem to adhere to a percentage of the space they take up in the form rather than a set diminsion. In other words, when I am editing the form and resizing it, the panels and the parts inside the form bend their shape such that the edges remain a few pixels from the edges.

But in my own program I have not been able to find where I can duplicate this feature. When I run my program, this (normal looking form/window) goes to this (expanded window/form with the components staying put when I want them to resize) when I click on the bottom right corner of the window and drag the mouse to resize.
  #2 (permalink)  
Old April 19th, 2010, 09:02 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,190
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Did you try with anchor your controls to the form?? look at that property.. This happends to you also at design time??
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
  #3 (permalink)  
Old April 28th, 2010, 07:41 PM
Friend of Wrox
Points: 608, Level: 9
Points: 608, Level: 9 Points: 608, Level: 9 Points: 608, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: St. Louis, , .
Posts: 100
Thanks: 0
Thanked 1 Time in 1 Post
Default

Yes, that worked.
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing form dotnetprogrammer VS.NET 2002/2003 0 February 23rd, 2005 01:58 AM
Question on dynamic changes to other form elements savoym Javascript 1 October 27th, 2004 10:17 AM
Resizing of form view - problem lmadhavi Visual C++ 2 October 1st, 2004 06:18 AM
How to create a custom form shape lotfi BOOK: Professional C#, 2nd and 3rd Editions 0 November 15th, 2003 07:55 AM



All times are GMT -4. The time now is 07:13 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.