954,549 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Resizing UserControl forms...or something like that.

I'm a newbie working on a program in C# .Net 2003 I'm trying to resize my user controls to populate them on another form. I've already coded a program in .Net 2005 in it I used auto size my user control through the properties window... 2003 doesn't have that as an option so I'm trying to figure out how to do it programatically (problematically whatever). I thought I could do it with:

System.Windows.Forms.Form.ActiveForm.Size = new System.Drawing.Size(496,(maxLenLine*22)+ 56);


or something like that???

Anyone have any word of advice or am I way off base?

Thanks

GRaymer
Newbie Poster
13 posts since Sep 2007
Reputation Points: 10
Solved Threads: 1
 

userControl1.Height = X;
userControl1.Width = Y;

Ramy Mahrous
Postaholic
2,196 posts since Aug 2006
Reputation Points: 480
Solved Threads: 276
 

Thanks for the reply... found out that I was over complicating it...I hate that. It was just:

this.Height = someControlHeight


SO thanks but I got it.

GRaymer
Newbie Poster
13 posts since Sep 2007
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You