Hello Rory,
From your post, my understanding on this issue is: you wonder how to avoid
a button click event raising several times due to rapid clicking. If I'm
off base, please feel free to let me know.
As Henning suggested, we can use a Timer object to resolve the problem. The
library "EventFilter" mentioned by Henning shows an example. Suppose the
"Next Button" object is btn_Next, we can call the following when the button
is initialized:
btn_Next.OnClick +=
m_objSelectedIndexChangedEventFilter.HandleOriginalEvent;
m_objSelectedIndexChangedEventFilter.FilteredEventRaised += JumpNextRecord;
where m_objSelectedIndexChangedEventFilter is a EventFilter object declared
as a member in the form class, and JumpNextRecord is the method that will
do the updatewinform work.
There is a const member "const int _DefaultTimeWindow = 150;" defind in the
EventFilter class. In order to change the wait time to 250ms as you
mentioned in the question, we can edit its value to 250.
Please have a try and feel free to let me know if you have any other
concerns or questions.
Regards,
Jialiang Ge ((E-Mail Removed), remove 'online.')
Microsoft Online Community Support
==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document:
http://blogs.msdn.com/msdnts/pages/postingAlias.aspx
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.