I am wondering if there is a way to host set a timed delay between two clicks a user can make on the same button.
It is an image host application however right now the user can flood my servers by rapidly clicking. So is there a way to set a 10 second time delay between when the user has clicked and when he can click again. And if they do try to click in that time it will have a MsgBox that warns them that they can’t click until the time is up?
Please note I don’t want to use Threading as I do not want to hang my program for the simple reason that it will be uploading the image at that time and there are other things on the application the user will want to do while it’s uploading.
Thanks!
Based on you mentioning MsgBox and Threading I’m assuming that the client is a Windows application. You could just disable the button for 10 seconds. Here’s some .NET 4.0 code:
… or the much prettier .NET 4.5 equivalent: