tags:

views:

37

answers:

3

How to communicate between two window forms, each has its own project, so forms not running under same process.

send and receive string value, .net 2

Thank you for the input.

using Interprocess Communication using Named Pipes sample: http://www.switchonthecode.com/tutorials/interprocess-communication-using-named-pipes-in-csharp

using .NET Remoting sample: http://www.codeproject.com/KB/IP/Net_Remoting.aspx

+2  A: 

.net remoting

Andrey
+3  A: 

You will have to use an interprocess communication mechanism that's supported by .NET. The standard ones are named pipes, sockets and WCF. This is always painful and it tends to destabilize your product since failure is so difficult to deal with. You'll need ten really good reasons to want to do this.

Hans Passant
IPC really is an art. This is definitely not something you want to stuff into your application without thinking.
ChaosPandion
very well explained thanks.
Power-Mosfet
@Power-Mosfet - Mosfets... brings back some good memories.
ChaosPandion
Named pipes are not supported in .net 2.0. Anyone should use remoting for .net to .net communication. also WCF is not in 2.0. Sockets can be used with .net remoting implicitly.
Andrey
@Hans Passant not sure that you read question carefully: ".net 2"
Andrey
@Andrey - okay, you're right. Good reason to upgrade.
Hans Passant
@ Hans, great comment as always, I have edited my topic,
Power-Mosfet
A: 

My vote is remoting for a 2.0 project. I had a requirement a couple of years ago where I had to have 2 separate apps communicate. The remoting worked like a charm. You just need to make sure you understand what is going on.

Mike Cheel