PDA

Click to See Complete Forum and Search --> : Question for the advanced


Inhumanoid
Nov 14th, 1999, 02:43 PM
I am making a program that starts other exactutables. Some executables will take some time to load. In that time I want my program to display an animation. I want the animation to stop when the executable(program) is fully loaded.
The executables that are started by my program can't comunicate with my program becuase I did not make them.

Is there a way that I can make my program detect when an aplication that it started is fully loaded (not finished) ??

I know Windows can detect it so I reckon a vb app should be able to detect it too..

Serge
Nov 14th, 1999, 06:11 PM
You can call your animation before you Shell your program:


Dim dblID As Double

'--------------------------
'Show your animation here
'--------------------------

dblID = Shell("C:\YourExternalProgram.exe",vbNormalNoFocus)
Do Until dblID <> 0
DoEvents
Loop

'------------------------
'Hide your animation here
'------------------------




Regards,

------------------

Serge

Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)

Inhumanoid
Nov 14th, 1999, 06:55 PM
Cool :) , and easy :)

Inhumanoid
Nov 14th, 1999, 09:25 PM
My animation halts as soon as the code goes into the do while loop.... Can I solve this ??

Yonatan
Nov 14th, 1999, 09:30 PM
That's because the loop does nothing at all and exits immediately... You could try using CreateProcess and WaitForSingleObject though.

------------------
Yonatan
Teenage Programmer
E-Mail: RZvika@netvision.net.il
ICQ: 19552879 (http://www.icq.com/19552879)
AIM: RYoni69

Inhumanoid
Nov 14th, 1999, 09:36 PM
How do I use that??

Serge
Nov 14th, 1999, 10:06 PM
There's already a Tip (http://www.vb-world.net/tips/tip5.html) on this site.


Regards,

------------------

Serge

Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)

Inhumanoid
Nov 14th, 1999, 10:19 PM
Serge,

What does that tip have to do with this problem ??

I want my animation (be it: avi,gif,picturebox with changing content, or whatever) to start when I load an app and stop when the app is loaded... I do not want the animation to stop when the app is finished (that's what the tip is about)

Your code work's great but when it goes into the do while loop the animation is halted

Inhumanoid
Nov 14th, 1999, 10:26 PM
I meant do until, not do while (sorry)