How do you disable the GUI while a procedure is running? I have a button click (or any other UI event) that I am processing and the user is clicking the button again because my response is not immediate. This then launches the event again!
The same issue is true if I need to wait for a response say from a web service. I need to update the display while I’m waiting for the service call to complete.
I would use a ProgressWheel or a toast message (small box with a message that I close after a while) or both to show the user something is happening, and disable the button to prevent re-click. Then enable the button back when the operation is complete.
Add a 10 ms timer to your webpage which contains your routine in the Action event. Turn it off in the inspector.
In the button :
Sub Action()
me.Enabled = false
Timer1.mode = Timer.ModeSingle
Timer1.enabled = true
End Sub
You are right, the GUI does not get updated while an event is not finished. So you use a timer to end the current event, update the GUI, and trigger another event where the process starts
If you have a long running process, put it into a thread and run it there. Run a client side timer, which keeps track of the progress of the thread. In the mean time, show a modal dialog which tells the user that the process is running. When the process completes, close the dialog.