Board index » delphi » Stop responding to mouse clicks after first mouse click??? -- Desperate!!!

Stop responding to mouse clicks after first mouse click??? -- Desperate!!!

G'Day All,

Using Delphi 2.0. I am writing a touch screen application. I would
like to respond to a SINGLE mouse click and then DISCARD any others
that are waiting in the message queue (ie. if a user repeatedly
touches the touch screen while screen 1 is visible I don't want the
additional mouse clicks to be processed by screen 2, screen 3 etc.)
and the only re-activate mouse events when I specify.

Another way...

click-ONE, click-TWO, click-THREE
Respond To Click-ONE
Ignore mouse clicks
Remove Click-TWO, Click-THREE from message queue
Respond to mouse clicks

I have played with PeekMessage and Applicatio.OnMessage and have not
been able to work this out. Please put me out of my misery. Appreciate
the help. Please mail me direct if possible....
--Donovan

---------------------------------------------------------------------------
"If you're not busy being born then you are busy dying"  - Bob Dylan

E-Mail: infoafr...@dial.pipex.co.za   (Donovan J. Edye)

For the BIGGEST tourist information source on Southern Africa direct your
web browser to:

http://www.infoafrica.co.za
---------------------------------------------------------------------------

 

Re:Stop responding to mouse clicks after first mouse click??? -- Desperate!!!


H|!

Quote
>Using Delphi 2.0. I am writing a touch screen application. I would
>like to respond to a SINGLE mouse click and then DISCARD any others
>that are waiting in the message queue (ie. if a user repeatedly
>touches the touch screen while screen 1 is visible I don't want the
>additional mouse clicks to be processed by screen 2, screen 3 etc.)
>and the only re-activate mouse events when I specify.

Declare a global variable. And every time the mouse is clicked check it and
if it is 0{for example} proceed else exit the handler. In the handler body
set this variable to 1{for example}. And you want your handler to work again,
set this variable to 0 again.
                                              SBR.
---
Bu...@stk.ksu.ras.ru
{Excuse me please for my bad russian, my native language is DELPHI 32-bit}

Re:Stop responding to mouse clicks after first mouse click??? -- Desperate!!!


H|!

Quote
>Using Delphi 2.0. I am writing a touch screen application. I would
>like to respond to a SINGLE mouse click and then DISCARD any others
>that are waiting in the message queue (ie. if a user repeatedly
>touches the touch screen while screen 1 is visible I don't want the
>additional mouse clicks to be processed by screen 2, screen 3 etc.)
>and the only re-activate mouse events when I specify.

Declare a global variable. And every time the mouse is clicked check it and
if it is 0{for example} proceed else exit the handler. In the handler body
set this variable to 1{for example}. And you want your handler to work again,
set this variable to 0 again.
                                              SBR.
---
Bu...@stk.ksu.ras.ru
{Excuse me please for my bad russian, my native language is DELPHI 32-bit}

Other Threads