如何将日期从Windows窗体传递到Windows服务

如何将日期从Windows窗体传递到Windows服务

问题描述:

你好
我有一个
名称为"WinFrom_Test"的WindowsForm
和名称为"WS_Test"的WindowsService

现在,我想将一个字符串或其他值从WinFrom_Test传递给WS_Test.
但是我该如何通过呢?
谢谢.

hello
i have a
WindowsForm with Name "WinFrom_Test"
and a WindowsService with Name "WS_Test"

Now i''d like to pass a String or an other Value From WinFrom_Test to WS_Test.
but how can i pass it.
Thank you.

Google是您的朋友:很好,经常拜访他.与在这里发布问题相比,他可以更快地回答问题.

快速搜索给出了超过一千万个结果: ^ ]

第四个是MSDN:演练:连接到Web服务中的数据(Windows窗体) [ ^ ]

将来,请尝试至少自己进行基础研究,不要浪费您或我们的时间.
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...

A very quick search gave over 10 million results: https://www.google.co.uk/search?sugexp=chrome,mod=7&sourceid=chrome&ie=UTF-8&q=connect+to+service+c%23[^]

The fourth one was MSDN: Walkthrough: Connecting to Data in a Web Service (Windows Forms)[^]

In future, please try to do at least basic research yourself, and not waste your time or ours.


您需要IPC(进程间通信)
有几种技术.这真的取决于您,因为您可以使用简单的文件,注册表,远程处理,wcf,基本的tcp/ip套接字,msmq....
You need IPC (inter-process communication)
There are several techniques. It really depends on you, because you can use a simple file, registry, remoting, wcf, basic tcp/ip sockets, msmq....