C# Rezing a usercontrole on Window form on resize event of Form

csharp Bombay, India
  • 12 years ago

    I m adding a user controle on window during runtime now i want to resize the size of this controle on the resize event of form?

  • 12 years ago

    Hi arshad,

    If you have an event handler for your custom control resize event, add that to your form resize event :

    this.Resize += new EventHandler(CustomControl1_Resize);

    You should have 'CustomControl1_Resize' defined somewhere anyway, no ?!

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why.”