Results 1 to 9 of 9

Thread: Question for the advanced

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 1999
    Posts
    309

    Post

    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..

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    You can call your animation before you Shell your program:

    Code:
    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
    [email protected]
    [email protected]
    ICQ#: 51055819


  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 1999
    Posts
    309

    Post

    Cool , and easy

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 1999
    Posts
    309

    Post

    My animation halts as soon as the code goes into the do while loop.... Can I solve this ??

  5. #5
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892

    Post

    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: [email protected]
    ICQ: 19552879
    AIM: RYoni69

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 1999
    Posts
    309

    Post

    How do I use that??

  7. #7
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    There's already a Tip on this site.


    Regards,

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

    Serge

    Software Developer
    [email protected]
    [email protected]
    ICQ#: 51055819


  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 1999
    Posts
    309

    Post

    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

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 1999
    Posts
    309

    Post

    I meant do until, not do while (sorry)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width