Refresh screen during a long process

  • Thread starter Thread starter BuddyWork
  • Start date Start date
B

BuddyWork

Hello,

I'm looking for away to refresh the current screen while
executing a stored procedure that takes (10 minutes to
run), because the code is running under a single thread I
cannot do this, if I run the stored procedure on another
thread then the user can click on process to run the
stored procedure again. I don't want the user to click on
the form again so I could disable the control but my code
which calls the stored procedure is common so it will not
know which form called it.
 
I believe that creating separate threads to do the stored procedure work is
going to be your best solution. Could you not have the thread call a
delegate when done that has a parameter for the form that started the
thread. Another solution is the good old Application.DoEvents()
 
Back
Top