application freezes

Hi;

When i make a time-consuming computation in my application, it freezes until that computation finishes, and it does not even allow the user to move the form or press a Cancel button, etc.

I think I have to use threads in somewhere but how? Or should I?

Thanx,

_yilmaz

Comments

  • : When i make a time-consuming computation in my application, it
    : freezes until that computation finishes, and it does not even allow
    : the user to move the form or press a Cancel button, etc.
    :
    : I think I have to use threads in somewhere but how? Or should I?

    Yes, threads would be better here. Use a thread to do the processing/computing and then your cancel-click can terminate the thread, if needed.
  • : : When i make a time-consuming computation in my application, it
    : : freezes until that computation finishes, and it does not even allow
    : : the user to move the form or press a Cancel button, etc.
    : :
    : : I think I have to use threads in somewhere but how? Or should I?
    :
    : Yes, threads would be better here. Use a thread to do the processing/computing and then your cancel-click can terminate the thread, if needed.
    :
    If you don't want to use threads, you can also call Application.ProcessMessages() after each step. This will allow the program to process the messages sent by windows.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories