views:

80

answers:

1

Hello, 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!

+2  A: 

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.

gabr
Hi and thanks for your answer. I'm not very experienced with threads, so I have to ask: How can I determine if TZipMaster supports processing Windows message? And how could I move it to the background thread? Thank you very much!
gonzales