events on application open/close (1 Viewer)

YevS

Registered User.
Local time
Today, 15:10
Joined
May 23, 2007
Messages
39
Hi,

I'm trying to write in some events that I want to start on application open and close. So far I have not been able to find those event handlers.

Open is pretty easy, just need to stick it on the first form that opens, but close is a bit tricky. There is no way to be 100% sure that any 1 form would remain open for the duration of the work and I havent found a dedicated event handle for it.

me.visible property does not seem to work for me in forms either (when trying to create an invisible form to handle these events.)

What I'm trying to do is create a table on startup and drop it when the application closes. I can probably do this via an array, but I'm trying to avoid that.

Any ideas?
 

OlcayM

Registered User.
Local time
Today, 17:10
Joined
Oct 30, 2007
Messages
47
Hi,

1)Open a hidden form on the start of application.
2) Forms load event put anything you wish
3) Forms close event put anything you wish

Since the form is hidden, it will not be closed accidantely. And during the applications close it will run his close event.

HTH
OlcayM
 

YevS

Registered User.
Local time
Today, 15:10
Joined
May 23, 2007
Messages
39
1)Open a hidden form on the start of application.

Thats my problem. I dont know how to do that.

visible = false doesent seem to work
 

OlcayM

Registered User.
Local time
Today, 17:10
Joined
Oct 30, 2007
Messages
47
1) Create a form with a name "frmHidden"
2) Forms load event put anything you wish
3) Forms close event put anything you wish
4) Save & close form
5) Create a macro with the name "autoexec"
6) Use openform command in the macro for frmHidden
7) Set Window mode option "Hidden"
8) Save macro and close

Since, whenever you start your application, a macro with a name "autoexec" will automatically runs, your form will be open and does whatever you wish

HTH
OlcayM
 

OlcayM

Registered User.
Local time
Today, 17:10
Joined
Oct 30, 2007
Messages
47
1) Create a form with a name "frmHidden"
2) Forms load event put anything you wish
3) Forms close event put anything you wish
4) Save & close form
5) Create a macro with the name "autoexec"
6) Use openform command in the macro for frmHidden
7) Set Window mode option "Hidden"
8) Save macro and close

Since, whenever you start your application, a macro with a name "autoexec" will automatically runs, your form will be open and does whatever you wish

HTH
OlcayM
 

Users who are viewing this thread

Top Bottom