code on form minimize button
Visual Basic
4
Posts
4
Posters
2
Views
1
Watching
-
There is no event specific to the Minimize control button in the uppoer right corner of the form. You have to handle the form's Resize event, and in that code, check the WindowState property to see if it's been minimized.
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Actually, there is a quite simple way. Type the code below, where <code>; is the action you want when the form is minimized: Private Sub Form1_SizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SizeChanged If Me.WindowState = FormWindowState.Minimized Then
End If End Sub
Please mail me with any questions or comments. Best Regards, Richard Faulkner