Link to home
Start Free TrialLog in
Avatar of Tom Knowlton
Tom KnowltonFlag for United States of America

asked on

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

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.


CONDITIONS:

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 applications.....in other words...no 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?


Thanks,

Tom

ASKER CERTIFIED SOLUTION
Avatar of RomanPetrenko
RomanPetrenko

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tom Knowlton

ASKER

>>>>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!!


Tom
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......
Avatar of stu_pb
stu_pb

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!