Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2006

Tip: Looking for answers? Try searching our database.

override maximize event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rich@rwbaker.com - 12 Jul 2006 12:42 GMT
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
Herfried K. Wagner [MVP] - 12 Jul 2006 14:11 GMT
<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!

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.