How do i get Reference of a running application

If a windows application is running, how can i get the reference of the form in that running application from my project. I am developing in .NET.



Answer this question

How do i get Reference of a running application

  • snjvsax

    Hi,
    yes Shaile you are right, I need 2 processes to communicate. Actually my requirements are of two types.
    1. There is a small piece of application say "AppX" which can be integrated with a large one say "AppY". And also "AppX" can be standalone ie. out side "AppY" which it was actually ment for when it was developed. Now we need to send values from "AppY" to "AppX", though we cant make "AppX" a dll as because it should have the ability to run outside the application "AppY". So we need inter process communication.

    2. Also i need a watcher in my Application(Say "1") which will actually monitor another application(Say "2"). Monitor like where the mouse has been clicked, what form has opened up in application "2". So over here i atleast need a reference of "2" in "1" to monitor the events.

    Hope i could explain you wht i actually need.


  • Raman Iyer

    Hi,
    You need to communicate between 2 Application Domains. As you want to access data from one aplication domain from another


  • R Pham

    Hi Bjorn,
    I have been using .NET 1.1 not 2.0, where .Exe projects can not be taken as reff, only class lib type projects are allowed to take reff. And also not always i shall be having the source code, i.e. the project in my hand. I might be having the EXE only.


    Arup

  • Babu2005

    If both your apps are .NET apps and writen in .NET 2.0 you can add a reference in your project to the first app's exe. When you did this you can access everything from the first app in the second app. if it's public of course.

    Regards,
    Bjorn


  • Padmaja B

    Is the form from the same application For what purpose do you need it


  • arnie

    Maybe this can help:

    http://www.dotnet247.com/247reference/msgs/19/96122.aspx

    I didn't test it out!

    Regards,
    Bjorn


  • James Clark

    How can i do that



  • C. Wells

    Hi!

    Arup you should check Remoting forum for inter process communication. There you'll find lots of similar question and their answers.

    http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=41&SiteID=1

    cheers.



  • Pankaj Arora

    Hello,
    As what I know about Application Domains is that, they are CLR constructs for seperating applications inside same process. So if both of your applications are running in same process then there is a possibility for them to talk to each other.
    But If you wanna 2 processes to communicate, then you have to go for InterProcessComunication.

    Am I right

    Also If you can explain what exactly you wanna do that will be helpful for finding the solution


  • Anat Oren

    No the form is from differnt application developed in VB.Net. I need to monitor what is happening i that form and also fire some if required.


  • How do i get Reference of a running application