C++ Builder new instance question...

This is a discussion on C++ Builder new instance question... within the Windows Programming forums, part of the Platform Specific Boards category; While my program is running, and the user click on a button, how do I make it to create a ...

  1. #1
    Unregistered
    Guest

    Lightbulb C++ Builder new instance question...

    While my program is running, and the user click on a button, how do I make it to create a new instance of the program? So then there will be two instances of my program running at the same time.

  2. #2
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,267
    you mean click a button in your program and a new instance runs?

    look into spawn*() functions?
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  3. #3
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    There are quite a few ways of doing this. The faq kinda delves into this subject. But if you need control over the new instance of the process you'll want to use CreateProcess(). Otherwise, ShellExecute() will do what you want.

  4. #4
    Unregistered
    Guest

    Lightbulb ...

    Yes, I've tried the ShellExecute() function to execute my program, and it worked quite well. However, since my program is a text editor, whenever I load a new text file, it cannot execute the program because it's in a different directory.

    GetCurrentDir();
    ShellExecute...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question about erase()
    By Sharke in forum C++ Programming
    Replies: 8
    Last Post: 06-10-2009, 02:22 AM
  2. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 01:14 PM
  3. Monitor a running instance of MS Word
    By BobS0327 in forum C# Programming
    Replies: 0
    Last Post: 07-18-2008, 01:40 PM
  4. Design layer question
    By mdoland in forum C# Programming
    Replies: 0
    Last Post: 10-19-2007, 05:22 AM
  5. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21