Reputation: 391
I want to zip a file within a thread using the TZipMaster component. The problem is, when I run the program from the IDE I get the error (from windows)
"the program doesn't respond anymore. -> Search online for a solution -> Close program"
(or somehting like that I don't know the exact message in english.."
However, the ZIP files are created succesfully. The last debugger output from Delphi 2009 is:
unload module: DelZIp179.dll
When I run the .exe directly, it seems to work fine and I don't get this error. However I'm not sure if I can just ignore this error or it's better to fix it?
Thanks for you replies!
Upvotes: 1
Views: 1174
Reputation: 26830
You get this error because your application is doing some heavy processing (zipping) in the main thread and is not processing Windows messages.
It is better to fix this - either you should process Windows messages while zipping (if TZipMaster supports that) or move zipping into background thread.
More info: I inspected the TZipMaster source and there's a OnTick event which gets called periodically.
Write a OnTick event handler and call Application.ProcessMessages from inside. That should remove your problem.
Upvotes: 2