FB II Compiler

PG PRO

Debugging

Memory

System

Mathematics

Resources

Disk I/O

Windows

Controls

Menus

Mouse

Keyboard

Text

Fonts

Drawing

Sound

Clipboard

Printing

Communication

ASM

Made with FB

FB II COMPILER

Keep control over the mouse clicks



The eyedropper routine is in a loop, so when I click on something outside the (eyedropper) window, all seems OK. When I exit the loop, the clicks take effect and my window disappears. Is there a way to clear them from memory?

Warren


Sure - call FlushEvents. That clears out the event queue, including all of your clicks.

Mars


Be careful though. Because if there are events in queue that happened _before_ your loop executed, and you flush them, they will not be processed. For instance, if an update event was waiting for the next null event to be processed, and you called FlushEvents, the update event would be flushed along with your mousedown events, and would not be processed by your app.

Just something to think about whenever calling FlushEvents. If you start noticing weird behavior, as if your app was not receiving events, FlushEvents may be the culprit.

David Blache