Hi Group

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abhayasthana2006
    New Member
    • Apr 2007
    • 2

    Hi Group

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

    Regards
    abhay
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by abhayasthana200 6
    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_QueryUnloa d 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.

    Comment

    Working...