-
August 14th, 2009, 11:38 AM
#1
Resizing Form help needed!
How do you make a form resize with the Window in a program? Currently, hitting maximize on a window makes the window expand but the form stays the same size.
I am not very familiar with C# but I believe this is a Windows property that needs to be changed rather than changing specifics in the code. I want to be able to make the form expandable just as it would be in Word, Firefox etc.
Any help would be greatly appreciated!
-
August 14th, 2009, 12:06 PM
#2
Re: Resizing Form help needed!
By default, forms are expandable, collapsible, and re-sizable. If yours is not then you change it. You probably modified the MaximumSize property.
-
August 14th, 2009, 03:02 PM
#3
Re: Resizing Form help needed!
No, it's not like that.
Let me clarify, my form expands normally just like any window would if you hit the maximize button at the top right hand corner. BUT, in this case, hitting maximize only maximizes the form whereas the textbox where my program is run stays the same base size it is set to. Also, I am not defining a maximumSize anywhere as you can see below so I am pretty sure that's not the case:
Code:
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(792,658);
The code above shows the size my form is initialized to and regardless of if I drag the form wider or hit the maximize button, the textbox where my code is displayed will not change.
Any help would be greatly appreciated.
Thanks in advance.
-
August 14th, 2009, 08:48 PM
#4
Re: Resizing Form help needed!
Set the Dock property of the text box as appropriate.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|