Improved Close Event

Discussion in 'Basic4ppc Wishlist' started by RandomCoder, Sep 26, 2008.

  1. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Is it possible to add a value within the Form Closing Event that shows whether the Close Event was triggered by a Cick or a Windows command (such as shutting down).
    This would allow us to selectively use the CancelClose property.

    Thanks,
    RandomCoder
     
  2. Cableguy

    Cableguy Expert Licensed User

    I think that can be already done by using the sender keyword...
    Checking if the close event was triggered by a known control, wich can be listed with the controls array...
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    The Sender keyword will not help here.
    It will always have the value of the closing form
    Sender can be helpful when you have one sub that handles events of several controls.
     
  4. Cableguy

    Cableguy Expert Licensed User

    Didnt thought of that....
     
  5. RandomCoder

    RandomCoder Well-Known Member Licensed User

    But is it possible to distinguish if a click event or a windows message was responsible for the form closing?

    PS I'm attempting to use DZT's Event magic to work my own temporary solution (first got to cook tea for the ankle biters, but will try again later following Agraham's advice)

    Regards,
    RandomCoder.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    I don't think that it is possible with managed code.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice