I think that with while(Thread::GetCount()); you are locking main thread with an infinite loop, and Guilocks in threads will wait forever.
Calling ProcessEvents(); inside the loop you let the GUI to be refreshed by the threads you have launched.
- intfile
This is a variable handled globally by different threads without any control, so results will be undefined...
A safer way could be to declare intfile as Atomic and increase it with AtomicInc:
Atomic intfile;
...
AtomicInc(intfile);
intfile will behave as an int, but multiple threads will access it safely.