I am using Visual Foxpro 6.0.

When a user clicks the "X" button on a form, the form.release() method
would be called. Is it possible to make it run the code in
cancel_button.click() event first?

I think it's a bad idea to call another event from within another event.
Right now I disabled the "X" button.

--
.~. Might, Courage, Vision. In Linux We Trust.
/ v \ http://www.linux-sxs.org
/( _ )\ Linux 2.4.22-xfs
^ ^ 11:30pm up 12 days, 2 min, 0 users, load average: 1.00, 1.00, 1.00

Re: calling button.click() from form.release()? by Eric

Eric
Tue Feb 03 09:51:49 CST 2004

Hello, toylet!
You wrote on Tue, 03 Feb 2004 23:33:21 +0800:

t> When a user clicks the "X" button on a form, the form.release() method
t> would be called. Is it possible to make it run the code in
t> cancel_button.click() event first?

When the X is clicked, the form.QueryUnload() fires. Here's what you can do.

* QueryUnload
thisform.cancel_button.click()
* to prevent further default QueryUnload behavior..
NODEFAULT

--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Re: calling button.click() from form.release()? by toylet

toylet
Tue Feb 03 10:25:07 CST 2004

my fault. thank you.

> When the X is clicked, the form.QueryUnload() fires. Here's what you can do.
>
> * QueryUnload
> thisform.cancel_button.click()
> * to prevent further default QueryUnload behavior..
> NODEFAULT
>

--
.~. Might, Courage, Vision. In Linux We Trust.
/ v \ http://www.linux-sxs.org
/( _ )\ Linux 2.4.22-xfs
^ ^ 12:24am up 12 days, 56 min, 0 users, load average: 1.04, 1.02, 1.01