Send a simple message between two Windows Apps running on same PC at the same time

Posted on 2005-04-06
Last Modified: 2010-04-16
Let's say I have 2 windows applications written in C#, AppOne and AppTwo.

AppOne has a TextBox and a "Send" Button

AppTwo has a TextBox.

I start AppOne, then I start AppTwo next...both on the same PC.

I type "hello" into the TextBox on AppOne and click the "Send" Button.

The word "hello" shows up now in the TextBox on AppTwo.


Please provide complete C# source code for AppOne and AppTwo.


I do not want to use TCP or UDP to do this unless there is NO other way.

I want to set up a true PIPE between the two other slight of hand with processes or send keys or sharing a text file....I want the "best practice" way to do this.  

For example, is what I am describing handled best by Remoting ... or Named Pipes?



Question by:knowlton
    LVL 8

    Accepted Solution

    Remoting also uses TCP or HTTP.
    I think you want to do this using .NET features and not using windows API through PInvoke?

    Remoting will be good for you - read this article:

    LVL 3

    Assisted Solution

    LVL 5

    Author Comment

    >>>>I think you want to do this using .NET features and not using windows API through PInvoke?

    This sounds like what I want....the .NET libraries way to do it.

    Let me read your link and also stu's link....and see where that leaves me......

    Thanks both of you!!

    LVL 5

    Author Comment

    Named Pipes are wrappers around Kernal32.dll is my understanding.....that is ... for them to work in .NET?

    Both Remoting and Named Pipes seems to take lots of setup.

    It seems like overkill for the simple task I am asking to do......
    LVL 3

    Expert Comment

    Other than using files to communicate I think you will probably have to choose between Remoting and Named Pipes, I haven't been able to find any simpler examples.

    Good Luck!

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
    This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now