将值从Windows应用程序传递到另一个

时间:2015-07-09 08:18:43

标签: c# .net winforms parameter-passing desktop-application

如何将值从Windows桌面应用程序传递到另一个Windows桌面应用程序?

我现在被困住了。我不想在一个Winform应用程序中构建两个不同的表单。

我需要两个不同的Winform应用程序相互通信,其中一个将值发送给另一个,接收者处理数据。 谁知道怎么做?

如果你能提供帮助,我将不胜感激。

3 个答案:

答案 0 :(得分:1)

您需要实现进程间通信,请检查此链接What is the simplest method of inter-process communication between 2 C# processes?

在此链接中,您可以找到多个选项来实现进程间通信,例如:

  • Windows Communication Foundation
  • Windows消息

答案 1 :(得分:0)

您还可以使用WCF在应用程序之间进行通信。看看WCF - Fastest interprocess communication

答案 2 :(得分:0)

如果您熟悉使用服务(.Net Remoting)的远程对象,那么您的两个应用程序可以使用此方法进行通信。

您可以参考此链接: https://www.daniweb.com/software-development/csharp/code/227615/simple-net-remoting-demonstration

相关问题