>Hi Viv,
>
>>Actually the Reszie event passes object and Eventargs parameters - the OnResize() method only receives the Eventargs (the 'sender' obviously being the class itself)
>
>Maybe I misunderstand your sentence, but it's OnResize that triggers Resize.
Hi,
Not very clear was it. I was just trying to point out that John was wrong in stating that the OnResize method had a 'sender' object parameter: i.e. when OnResize() raises the Resize event it adds the first parameter automatically:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.Resize += new System.EventHandler(HandleResize);
OnResize(null);
}
protected override void OnResize(EventArgs e) { base.OnResize(e); }
private void HandleResize(object sender, EventArgs e) { }
}