>>There you have it. Now, is this really the easiest way? I mean, wouldn't be simplier to call a WIN32API function when we want to avoid keyboard and mouse buffer instead of handling this object?
>>
>>Thanks.
>
>It's only a question of choice.
>
>IMHO, add a transp. shape on top of all control of the form during developpement and set this shape 'visible=.F.' is far more easy and less hasardous then play with the API.
>
>And put a
>
thisform.TopShape.Visible=.T.>before other instructions, and
>
thisform.TopShape.Visible=.F.>after is not a big overhead compare to any other way to handle this.
Now that I think of it, we did something similar to that in a project 2 years ago. We had the same problem when the user was clicking too fast. We came to the same conclusion that keyboard and mouse buffer are processed at the end. What we did is to define a timer object.
So, it goes like this:
1. In the method, disable the button
2. Process the method
3. Instantiate the timer
At this point the button is disable, however we need to put it enable back.
This is where the timer comes in. Having an interval of one second, he will then enable the button back. But, the keyboard and mouse buffer is already empty.
This was an idea of another Michel. :)