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

Thread: Two Apps

  1. #1
    Join Date
    Sep 1999
    Location
    Leeds U.K. (Proud to be Sheffield Born)
    Posts
    202

    Two Apps

    (Thanks, Lothar.

    Many moons ago I believe it was yourself who supplied me with the answer to a fairly straight forward query about using one exe to launch a second. The solution was based on "Shell". Well...)
    I wish to run two exe's concurrently. One organises some system niceties and supplies introductory forms. Based on user input, it launches whichever one of several exes is appropriate. Thus, while being used, the app Group runs two exes concurrently.
    I cannot figure out how to close down the "backgroup" app when the Principal one is closed. Can Shell perofrm both a launch and a closure?

    Thanks for reading,,
    Surrendermonkey




  2. #2
    Join Date
    Feb 2000
    Location
    Indiana
    Posts
    308

    Re: Two Apps

    If you create your second app as an ActiveX exe, then you could control it through Automation and be notified through events about the status of your second app. Since you're writing both apps, this might be a solution worth investigating.


  3. #3
    Join Date
    May 1999
    Posts
    3,332

    Re: Two Apps

    >Can Shell perofrm both a launch and a closure?

    I don't think so.
    You could try to post a WM_CLOSE message to your second app.
    You need to get the window handle of the main form window, though.
    If you know the caption of that form window you could use the FindWindow API to get the window handle of your second app.

    if you need full control over both apps and have the source code for both apps, I suggest you turn your apps in ActiveX Exes and use COM (automation) to control your apps.


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