Omnimaga

General Discussion => Technology and Development => Computer Programming => Topic started by: Stephan on April 25, 2010, 01:25:28 am

Title: VB Form passes external shell commands to module console, but GUI freezes. Help?
Post by: Stephan on April 25, 2010, 01:25:28 am
Alright Geniuses of the World, here is a problem you guys can try your hands at for me. I have a console application with an added form for the next release of my most successful project, XP Maintenance. Just one problem, when the Form calls a method that executes system shell commands, while the shell commands operate without much problem, the GUI on the Form freezes and goes white. Not too good-looking to an average user, so i want to know if it is possible to fix this problem. Source code attached.
Title: Re: VB Form passes external shell commands to module console, but GUI freezes. Help?
Post by: cooliojazz on April 25, 2010, 02:44:54 am
Umm, I would say, probably because whenever you have code that it runs, it has to wait for it to complete before the rest of the code starts running again, so it can't paint the form while that code is running.  I would try to run all those in a separate thread...
Title: Re: VB Form passes external shell commands to module console, but GUI freezes. Help?
Post by: Stephan on April 25, 2010, 10:44:05 am
Thanks. +1 for you. I'll tae a look at that. That makes sense.
Title: Re: VB Form passes external shell commands to module console, but GUI freezes. Help?
Post by: DJ Omnimaga on April 25, 2010, 12:07:40 pm
I done VB before but it was almost 7 years ago with VB6 and we only did some rudimentary game-oriented stuff only (see downloads section) so I can't really help much, sorry :(