>hi,
>thank you for reply.
>i put the code as timer1.program
>
>when i run timer program i get just (click ok to exit)
>
>if i want to run main program,can i put it befor wait window.
The MessageBox() was only to keep the variable in scope. A READ EVENTS will also work, but I only wanted to give a quick example. In a real program, you might use a public variable for the CreateObject().
Also, the WAIT WINDOW is only an example. When I run the sample code, I get the WAIT WINDOW every 10 seconds, until the MessageBox() is closed. I tested this in VFP 6.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)