How to Cancel a long process

  • Thread starter Thread starter Ofer B.
  • Start date Start date
O

Ofer B.

Hi
I need to download a file from the internet, and than insert the file to
SqlCe database, this process taks 2 to 4 minuts. (depend on the connection
to the internet)
How can I let the user the option to cancel this event in the middle ?
I can check a boolean variable while i'm in the loop but when this process
run, the pocket PC don't respond to a cansel button that set the boolean
variable
thanks
ofer
 
You need to perform your long process in a separate thread, so that the user
interface continues to be active. When you are performing the long process
with the user interface thread, no event processing occurs, so the Cancel
button doesn't get handled.

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top