Yeah Pete the 2nd time I tried it I put a delay on if mb to wait until button released before processing and also an immediate end of program with any keypress in processing loop...
but it's a prank ;-))
Yeah, mouse handling needs more than just single button detection. I use this, or similar code...
clicked_l% = -1
IF clicked_l%
= -1 THEN clicked_l%
= 1 IF clicked_l%
= -2 THEN clicked_l%
= 0 ELSE clicked_l%
= 1
The -2 setting is for a case where a click in a previous routine activates a process but it needs to stay active until another click takes place. The other values ,-1, 0, and 1 allow for the process to complete only after the left mouse button is released. Notepad uses a similar technique. Click "File" and without a release, the file window will pop up. You can then then move the mouse, either with the button still down or up, and it will highlight the corresponding menu selections. Press the mouse button down on a selection... but wait, that selection will not process until the left mouse button is released.
I consider myself not only a SCREEN Zero Hero, but also the King of Drag, but if Bill puts his mind to it, he could become a close second. Hey, that would make Bill the drag queen around here. Well at least now I know why he supports QB64 as a cross-platform language.
Pete