You'll have to override the WndProc(ref Message m) method of the Form.
Once you do that, you'll have to look for the message that is sent for
a resize and kick off your methods. I'm not entirely sure what the
constant is for the window resize, but you should be able to find it
fairly easy by experimenting with debug statements and a little trial
and error.
Something like this might do:
bool _blnResizing = false;
protected override void OnResize(EventArgs e)
{
_blnResizing = true;
base.OnResize(e);
}
protected override void WndProc(ref Message m)
{
if(_blnResizing && m.Msg == 533)
{
//TODO: add your code here.
_blnResizing = false;
}
base.WndProc(ref m);
}
I'm not Exactly sure that 533 is the message number in question but I'm
*pretty* sure it's your machine saying you've performed a non-client
mouseup. You may get a better idea by scanning the Win32.h file on your
machine and looking at the names of the constants.
I hope that's helpful.
Ben Lesh
Author, SlickWin Forms Control Suite
Fully Customizable .NET Component Suite
http://www.slickcode.com/slickwin.aspx