in reply to Win32::GUI and Focus Problems

All your problems seems to stem from the fact that Win32::GUI::DoEvents() isn't called during the operation. Like BrowserUK says, threads is exactly the right solution to this problem, but you need to be a bit careful to not mess upp the Win32::GUI XS code.

On the win32-gui-users list I recently posted two entries about my first attempt and the resulting module to do this in a fairly neat way.

It uses Thread::Queue to communicate between the main thread (the GUI) and worker threads that perform the long-running operations.

The demo application does a GET and updates the GUI (which stays responsive) with a progress bar while getting each chunk of data. It can be cancelled with a Cancel button in the GUI.

This works because LWP provides callbacks to allow this. If the module you wanted to use does the same it should be a fairly simple task to adapt the demo program to your situation.

/J

Replies are listed 'Best First'.
Re^2: Win32::GUI and Focus Problems
by smcone (Acolyte) on Mar 25, 2005 at 05:48 UTC
    Thanks alot for this feedback

    I will take a look at how you did it,it will definitely solve my problem.

    Thanks again. Steve