I'm looking to execute a function when the Max button is clicked.
I'd like to override the maximize event on an MDI child form so that
instead of maximizing, it just fills the MDI area. I've found the code
to max the form to the mdi size, but no luck on how to execute my
function on the Max button click.
I've been looking for a solution, but still no luck. I found the
"MinMaxFormSize" article but it's not quite what i'm looking for.
Thanks for any help.
rich
- vb.net '03
<rich@rwbaker.com> schrieb:
> I'm looking to execute a function when the Max button is clicked.
>
> I'd like to override the maximize event on an MDI child form so that
> instead of maximizing, it just fills the MDI area. I've found the code
> to max the form to the mdi size, but no luck on how to execute my
> function on the Max button click.
Handle the form's 'Resize' event and check its 'WindowState'.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
rich - 12 Jul 2006 15:05 GMT
Of course it's that easy, hah. Thank you!
Now, should I do this:
If Me.WindowState = FormWindowState.Maximized Then
Me.WindowState = FormWindowState.Normal
childMax()
End If
which results in a bit of flash since it's maximizing then going back
to normal, or is there a way to capture the max before it happens?
Thanks again!