J
JDeats
I have a WinForms based application written for the .NET Framework 2.0
and in this application I need to be able to be able to take some
action in code when the user finishes resizing the form.
I can easily create an event handler for the SizeChanged form level
event, the problem is if the user is using a mouse drag to resize the
form this event is firing every few milliseconds or what have you
until the user stops the drag process.
The approach I've taken is to create a Timer object and inside that
timer Tick event handler check the status of a flag that I'm setting
inside the form SizeChanged event handler. As I suspected, this a
sloppy approach that feels like a hack and it doesn't work without
bugs.
Can anyone recommend a proper way to do this?
and in this application I need to be able to be able to take some
action in code when the user finishes resizing the form.
I can easily create an event handler for the SizeChanged form level
event, the problem is if the user is using a mouse drag to resize the
form this event is firing every few milliseconds or what have you
until the user stops the drag process.
The approach I've taken is to create a Timer object and inside that
timer Tick event handler check the status of a flag that I'm setting
inside the form SizeChanged event handler. As I suspected, this a
sloppy approach that feels like a hack and it doesn't work without
bugs.
Can anyone recommend a proper way to do this?