Results 1 to 6 of 6

Thread: Problem with loading exe files.....

  1. #1

    Thread Starter
    Lively Member Adrian Koh's Avatar
    Join Date
    Jan 2001
    Location
    Johor, Malaysia
    Posts
    64

    Question

    Is there a way to execute an .exe file using Visual Basic

    I have a midi to text converter. So how do it start and stop it using vb.

    The syntax:
    c:\converter.exe source.mid destination.txt

    So how do i use visual basic to code it....

    Thanks a lot.
    VisualBasic5.0ServicePack3

  2. #2
    Addicted Member JasonGS's Avatar
    Join Date
    May 2000
    Location
    California
    Posts
    155
    Code:
    X = Shell("c:\converter.exe source.mid destination.txt")

  3. #3

    Thread Starter
    Lively Member Adrian Koh's Avatar
    Join Date
    Jan 2001
    Location
    Johor, Malaysia
    Posts
    64

    Talking Thank You

    Thank very much.

    What is the X in front of the Shell for?
    VisualBasic5.0ServicePack3

  4. #4
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    He is just assigning a variable if you needed to call this code more than once:
    Code:
    Dim x as string
    
    x = Shell("C:\Pathname\A_File_Here.exe")
    You can leave this out & use the following :
    Code:
    Shell "C:\Pathname\A_File_Here.exe"
    (Notice I've left the brackets off though)

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  5. #5

    Thread Starter
    Lively Member Adrian Koh's Avatar
    Join Date
    Jan 2001
    Location
    Johor, Malaysia
    Posts
    64

    Talking Thank You

    Thank you for your help.
    VisualBasic5.0ServicePack3

  6. #6
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Thumbs up

    Adrian, X is the TaskId return by the Shell function.
    Which may applicable to those wish to have further task manipulation.

    Cheers!

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