CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: How do I?

  1. #1
    Join Date
    Jan 2004
    Location
    TX, USA
    Posts
    347

    How do I?

    Open Program A.
    Shell to Program B. Select parameter.
    Receive parameter in Program A and close Program B
    continue Program A

    Thanks
    Cathy
    Cathy
    Jan 2004 - NEWBIE to VB6
    Any and all help appreciated

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: How do I?

    That doesn't help. Explain what you mean, what you have tried already, and finally, the part that you are stuck with. We don't write apps for people
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    May 2008
    Posts
    224

    Re: How do I?

    You can shell to the program using the shell statement. Parameters can be passed as part of the command sent to the shell. The calling program can be terminated afterward just the same as any program.

    The program you have shelled to can receive the command line parameters in the Command$ variable. Assuming of course that the program you are calling is one that you are writing in VB as well.

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: How do I?

    Unless they are both written by him/her. Then you could pass common variables.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Jan 2004
    Location
    TX, USA
    Posts
    347

    Re: How do I?

    Well, it is written by me/her. But you know, I don't want to screw up. I will post my code but for the .... of it, I forgot to make the marks before and after the code.
    I.E I thought
    [code]
    ...
    [codeend]

    But that doesnt' work

    So, I'll just wait and have dglienna write it for me.

    Thanks
    Cathy
    Cathy
    Jan 2004 - NEWBIE to VB6
    Any and all help appreciated

  6. #6
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: How do I?

    whatever tag you start, you end with a slash
    Code:
    ' this is your code!  enjoy
    ]code[
    like this almost
    ]/code[
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  7. #7
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: How do I?

    Cathy,
    Take a look at this sample, it uses GetExitCodeprocess API to check the return value.

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

Featured