|
-
August 8th, 1999, 05:28 PM
#1
Catching the Minimized button
My very favorite form has MinButton = True. I want to call my very favorite procedure (Private Sub MinimizeEvent) when the user clicks the MinButton. Any way to do this?
-
August 8th, 1999, 07:30 PM
#2
Re: Catching the Minimized button
Simple direct VB way would be to catch the _Resize event and check for Me.Minismized=True
private Sub Form_Resize()
if me.Minimized = true then
Call MyFavoriteMinimizeProcedure
'or
RaiseEvent MyFavoriteMinimiseEvent '!!
exit sub
end if
' else handle it if you care!
end sub
Another (pure) API way would be to subclass the form. When the user clicks any of the control-box buttons you get a WM_SYSCOMMAND (with command type = SC_MINIMIZE, for Minimise btn ) event . You can latch on to this to do your processing. This would be under the hood of VB.
RK
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|