In that case rather use a keyboard shortcut to enable and disable, put a 
Pop-up menu on the form and assign a shortcut to the menu items. Write 
your code for enable and disable inside the menu items click.

This is not the most efficient way, but it's the easiest and judging 
from what you've said before, it seems like you're looking for the 
easiest solution and not necessarily the best solution.

Cheers
Louis

mardirossian patrick wrote:

> Dont know how to do !
>
> Let me try to explain what I want to do.
>
> !*************************************************************!
> ! here my game using a webbrowser**********************************!
> !
> !
> !
> !
> !===**************==!
> != = here my 2nd prog== !
> !===**************==!
> !*************************************************************!
>
>
> I do not have control on the second program since it click on the 
> webbrowser
> every 1 sec.
> I tried to put 2 buttons on my prog. form (2nd prog.), 1 to enable the 
> timer
> , 1 to disable , but i have to be very fast.
>
>
>
> ----- Original Message -----
> From: Louis Young
> To: [email protected]
> Sent: Friday, May 06, 2005 8:49 AM
> Subject: Re: [delphi-en] Timer and mouse-event
>
>
> Why not disable the timer on the QueryClose event?
>
> mardirossian patrick wrote:
>
> > Hi ,
> >
> > I am  using a Timer and mouse-event  in a program ,
> > i made my form allways on top , in fact im trying to play
> > a game with this program , now the question is how
> > to close my program ?
> >
> > I tried to test the right click to stop the program , the problem
> > is that my form is a small one  and the timer interval is set to 1000.
> >
> >
> > Here is a part of my code :
> >
> > procedure TForm1.Timer1Timer(Sender: TObject);
> > begin
> >   SetCursorpos(20,20)
> >   mouse_event( MOUSEEVENTF_LEFTDOWN....
> >   SetCursorpos(40,20)
> >   mouse_event( MOUSEEVENTF_LEFTDOWN....
> > ....
> > ....
> > end;
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> > -----------------------------------------------------
> > Home page: http://groups.yahoo.com/group/delphi-en/
> > To unsubscribe: [EMAIL PROTECTED]
> >
> >
> > ------------------------------------------------------------------------
> > *Yahoo! Groups Links*
> >
> >     * To visit your group on the web, go to:
> >       http://groups.yahoo.com/group/delphi-en/
> >
> >     * To unsubscribe from this group, send an email to:
> >       [EMAIL PROTECTED]
> >       <mailto:[EMAIL PROTECTED]>
> >
> >     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> >       Service <http://docs.yahoo.com/info/terms/>.
> >
> >
>
>
>
> -----------------------------------------------------
> Home page: http://groups.yahoo.com/group/delphi-en/
> To unsubscribe: [EMAIL PROTECTED]
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
> -----------------------------------------------------
> Home page: http://groups.yahoo.com/group/delphi-en/
> To unsubscribe: [EMAIL PROTECTED]
>
>
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
>
>     * To visit your group on the web, go to:
>       http://groups.yahoo.com/group/delphi-en/
>        
>     * To unsubscribe from this group, send an email to:
>       [EMAIL PROTECTED]
>       <mailto:[EMAIL PROTECTED]>
>        
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to