Click here to Skip to main content
15,921,203 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have two Windows Forms applications on different computers. What I want to do is when I click a button on one of the forms a command will be sent to the other computer and the other computer would respond. I want to do this remotely not between computers connected with a cable it could be computers that are on different continents for instance.

An example code would be splendid.
Posted

I'd say communication over TCP/IP sound feasible in your case. Perhaps these articles would be helpful:
- An Introduction to Socket Programming in .NET using C#[^]
-A Complete TCP Server/Client Communication and RMI Framework in C# .NET - Implementation[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 22-Feb-15 10:26am    
5ed, but the level of TCP and sockets is not the only one which could be used. See also Solution 2.
—SA
It can be done on one of several different levels of networking, remoting or WCF.
Please see my overview of these approaches in my past solutions:
how i can send byte[] to other pc[^],
Communication b/w two Windows applications on LAN.[^].

—SA
 
Share this answer
 
Comments
Wendelius 22-Feb-15 11:15am    
Good options!
Sergey Alexandrovich Kryukov 22-Feb-15 11:28am    
Thank you, Mika.
—SA
Maybe signalr could also be interesting.
A lot of information you will find on:
http://www.asp.net/signalr/overview/guide-to-the-api/hubs-api-guide-net-client

It depends on your final target. Maybe you like to have also one ore multiple webclients instead only winforms....
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900