By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,096 Members | 1,264 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,096 IT Pros & Developers. It's quick & easy.

Hi Group

P: 2
can anybody tell me how to handle events when user clicks on the X(close) or maximize or minimize buttons

Regards
abhay
Apr 3 '07 #1
Share this Question
Share on Google+
1 Reply


Expert 5K+
P: 8,434
can anybody tell me how to handle events when user clicks on the X(close) or maximize or minimize buttons
The "x" will produce a Form_QueryUnload event. If you don't cancel that, then it will generate a Form_Unload event. Then the form will be gone.

The Max and Min buttons will both produce a Form_Resize event.

(This is all assuming VB6. If you're using a different version, then things may work differently.)

Note, if you set up your code to resize things when the form size changes, you should test the form's WindowState property first and skip everything if it is minimised, as the size will be 0 and can produce errors in your code.
Apr 3 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.