PDA

Click to See Complete Forum and Search --> : minimize maximize


PITBULLCJR
Dec 14th, 1999, 08:19 PM
I know you can put code in vb for when someone hits the x to kill the program you can have it so it doesn't unload by using
form_unload(cancel as integer) or something along those lines it doesn't matter but is there code that says when the maximize button is hit then something happens or if the minimize button is hit then something happens?

Joacim Andersson
Dec 14th, 1999, 08:24 PM
Yes, you can use the Form_Resize event and check the value of the WindowState property:

Private Sub Form_Resize()
Select Case Me.WindowState
Case vbMinimized
'Do Whatever
Case vbMaximized
'Do something else...
End Select
End Sub

Good luck!

------------------
Joacim Andersson
joacim@programmer.net
joacim@yellowblazer.com
www.YellowBlazer.com (http://www.YellowBlazer.com)

PITBULLCJR
Dec 14th, 1999, 08:27 PM
Thanks you so much it works great. Now i can put the finishing touches on my project. Thanks a lot!!!!!!