Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Calling exes from Visual Basic

  • 13-01-2005 10:37am
    #1
    Registered Users, Registered Users 2 Posts: 1,368 ✭✭✭


    Hey Guys,

    I have written some imaging processing code in Visual Basic

    The code calls some .exes to convert a .bmp image to a certain custom file format.

    This program convert.exe is exeuted twice from the VB program to convert two seperate images. I don't think I can call the exe on both images at the same time, so is there anyway of checking (within my VB code) if the program has finished executing on the first image, before I call it for the second?

    Cheers,
    Martin


Comments

  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    How are you launching the exe's? You can attach to a process through the API so you can tell when its finished. I don't know if you can do that when using the Shell function its been a while since I've done VB. I may have code at home somewhere.


  • Registered Users, Registered Users 2 Posts: 15,443 ✭✭✭✭bonkey


    Shell is asynchronous-only, IIRC.
    I seem to remember needing to trawl the various code sites for exactly this...but its definitely there.

    king_of... do a google for "synchronous Shell Visual Basic sample" or somesuch and see how you get on.

    Synchronous shell will - for info - not return control to the VB program until the shelled app has completed.

    Alternately, look up how to get a list of running processes and then search the list for the .exe...again, its an API call or three.

    jc


Advertisement