I plan a Form with 6 buttons. They all shall use the same ButtonClick() Event.
When buttons 1-3 are pressed, all 3 buttons are disabled (so they can't be pressed again) and a corresponding longer running task is started, which may call Application.ProcessMessages(). This would allow, that buttons 4-6 can be pressed, which start only very short tasks, where Application.ProcessMessages() can not be called. When a longer running task is finished, buttons 1-3 are enabled again.
From my understanding this concept would mean, that Event ButtonClick() could be entered a 2nd time (by buttons 4-6), while the 1st call to this ButtonClick() Event (by buttons 1-3) has not yet returned, as long as it's corresponding longer running task has not finished.
My question is not, if this concept would win a price for very good programming style.
My question is, whether any real trouble might occur doing so.
If the answer would be yes, one normaly would "move" the start of a corresponding longer running task via Application.QueueAsyncCall(). But then the longer running task would be started, when the Application "is idle" the next time, but I had no (or very difficult) control about this point in time.
That's why I'm asking, whether any real trouble might occur entering Event ButtonClick() twice.
Thanks in advance.