Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Do I Call OnResize() ?
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01412846
Message ID:
01413157
Views:
44
>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) { }
    }
Previous
Reply
Map
View

Click here to load this message in the networking platform