Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ignore mouse click
Message
From
27/09/1997 00:16:56
 
 
To
26/09/1997 22:11:45
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00051797
Message ID:
00051929
Views:
36
>>>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. :)

Since it seems that whatever you do, you still have to modify in all places from where you make this call (unless you have a special class to deal with this), I think the easiest solution is to send the THIS object as a parameter to the second form. In this way, you have just one line (the one where you call the second form) to modify in more places and you can do all the rest (enable, disable the calling button) in the called form.

Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform