(07-25-2022, 09:53 PM)bplus Wrote: Yes there is a way to do this that waits for _Mousebutton(1) to clear, Old Moses had a nice little sub, but Ken doesn't recall I don't think, I saved it but on my hard drive that I lost.
Maybe @OldMoses could remind us?
I learned the simple _delay trick from Pete.
That was my Clear_MB (mouse button #) subroutine. I call it immediately after I get a mouse click and pass the button number, then let whatever sort of mouse button handling I need to do. It stops any chance of a "click through" event. I've never noticed any tendency to slow things down.
EDIT: Ah, I see you guys already found it. Glad it can be of use.
Code: (Select All)
'Description
'Clear the mousebutton queue
SUB Clear_MB (var AS INTEGER)
DO UNTIL NOT _MOUSEBUTTON(var)
WHILE _MOUSEINPUT: WEND
LOOP
END SUB 'Clear_MB
DO: LOOP: DO: LOOP
sha_na_na_na_na_na_na_na_na_na:
sha_na_na_na_na_na_na_na_na_na: