## TBackgroundWorker and modal windows

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

### TBackgroundWorker and modal windows

I have something like this:

Code: Select all
button click:create windowexecute threadshow window modalwindow cancel button:thread cancelwork event:if cancellation pending then accept cancellation, display aborted and exitexecute slow function here

But this one can't display status aborted immediately, also after next button click component tell me that is already run.
How to fix it?

Also some cancel event or something similar will be nice, aren't they?
anom69
Member

Posts: 2
Joined: January 21st, 2013, 2:08 pm

### Re: TBackgroundWorker and modal windows

The delay depends on the delay between the two consequent pending cancellation checks. In other words, it's just your code that defines how fast the thread should respond to a cancel request.
By the way, do not show the "aborted" message inside the thread. Generally all the UI interactions should be done in the main thread only.
Kambiz

Kambiz

Posts: 2430
Joined: March 7th, 2003, 7:10 pm

### Re: TBackgroundWorker and modal windows

No, this is report feedback for event only

Could you show me sample how to use your component with modal windows?
anom69
Member

Posts: 2
Joined: January 21st, 2013, 2:08 pm

### Re: TBackgroundWorker and modal windows

Please send me a sample program with that problem to me, so that I know exactly what are you going to do and apply the fix. It will also save a lot of my time.
Kambiz

Kambiz