Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to sync a button between different computers, like when I push a the button on my computer a button on a nother computer will also be "pushed", like google docs. Thank you in advance
Posted

You need a (very simple) 'server' program handling the request of the two client programs, accordingly updating the button state (and eventually notifying the update event to its clients).
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 16-Nov-14 12:15pm    
Not clear. Did you say that a server is a third program, other that the two with the buttons? It's possible but would be very redundant. Anyway, please see my answer. (And, anyway, there is nothing to be taken seriously here. :-)
—SA
Each computer which responds to the remote button push should run some network service program/daemon and wait for connections from other computers. The computer where you physically push the button should play the role of client part. You can use socket API to achieve that.

Note that this can be considered as some exercise in programming at best, but not as a real architectural element for solving real software problems. In robust architectures, UI should be thoroughly separated from other aspects of the application.

—SA
 
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