Link to home
Start Free TrialLog in
Avatar of ampapa
ampapa

asked on

How to refresh main form when batch is running

I have a program that launches a batch file that does some processing. If I open another application and or my application loses the focus and the new window opens on top of my application the main form does not refresh or redraw itself. I also get the message to "switch to another program..".

My batch uses the "WaitForSingleObject" API to wait for the batch to terminate.

How can I fix this problem?

T.I.A
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ampapa
ampapa

ASKER

When the batch is running I set the mouse pointer to vbhourglass but yet I'm able to select items on my form is there a way to stop this?
Right, changing the pointer won't prevent clicks on the form.  You can disable the whole thing with Me.Enabled = False if you like, or manually disable/enabled invdividual controls as necessary.

~IM