CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Posts
    60

    Previous Instance in .NET

    Hi,
    I wanted to know whether my exe is already running or not and based on that i need to take some action. If it is already running i need to call a button click event of the already running instance else invoke the application.
    can any one please help me out in finding the previous instance.
    Thanks in advance.

    Vinoth

  2. #2
    Join Date
    Sep 2006
    Location
    Eastern, NC, USA
    Posts
    907

    Re: Previous Instance in .NET

    Quote Originally Posted by nvinoth123
    Hi,
    I wanted to know whether my exe is already running or not and based on that i need to take some action. If it is already running i need to call a button click event of the already running instance else invoke the application.
    can any one please help me out in finding the previous instance.
    Thanks in advance.

    Vinoth
    This has been addressed previously, and I think that you'll find satisfactory answers here:
    https://forums.codeguru.com/showthread.php?t=365303
    https://forums.codeguru.com/showthread.php?t=357536
    https://forums.codeguru.com/showthread.php?t=345792


    /Pete

  3. #3
    Join Date
    Jun 2002
    Posts
    50

    Re: Previous Instance in .NET

    You can write some thing like this:

    // Get all instances of program running on the local
    // computer.
    Process [] xyz = Process.GetProcessesByName("xyz");
    Siri

    If you liked the information, rate my response.

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