Hi Al, Afraid I don't really have an answer to your question, but one comment I'd have would be really, really try to minimise or eliminate calls to ProcessMessages. I see people in many places online saying use ProcessMessages, but it's a hack IMHO.
I haven't used it for years. There are a number of ways in Delphi to remove the use of ProcessMessages, and they don't all involve threads. ;-) However if you really must use it, you could put a call to Sleep(some small number of milliseconds like 10 or 50) in your loop which will give some time back to the OS, and stop your app hogging it. HTH, Conor -----Original Message----- From: Alistair George [mailto:[EMAIL PROTECTED] Next question! How do I determine when the hard disk is not being used. For example, when there is a change to determined folders, I do not want the monitor to activate until it has finished working. Tried to use onidle, but the application.ProcessMessages; or any loop make it busy! //eliminate double operations by tickccount tics := GetTickCount; while (gettickcount - Tics < 1000) or (not IsIdle) do application.ProcessMessages; IsIdle:=false; procedure TMainform.IdleHandler(Sender: TObject; var Done: Boolean); begin IsIdle:=True; end; --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
