Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to send button down to  a button of another WPF C# application

Posted on 2011-03-17
6
Medium Priority
?
419 Views
Last Modified: 2013-12-17
I wrote an WPF C# application (called slave application)  that have a button. When click on it, it will perform a task.
Now I launch 10 copies of this slave application.
I will like to be able to create another C# application (called master application) with a buttton. When click on this button in the master application , it will as if I have manually clicked on each of the button of the 10 copies of the slave application.

Did anyone have any idea how I can achieve that?
0
Comment
Question by:tommym121
4 Comments
 
LVL 7

Expert Comment

by:nbove
ID: 35161308
1)  Ensure that the method responsible for handling the button click in the "Slave" application is marked as public.

2) In the event handler of the button click in the "Master" application, iterate over each "Slave" application instance and call the method responsible for handling the button click.
0
 

Author Comment

by:tommym121
ID: 35161703
Any code example to show how this to be done.
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 1600 total points
ID: 35371698
I would suggest something more along the lines of IPC (Interprocess Communication).  You could use a TCP/IP socket, .NET remoting, or a named pipe.

Simple Inter-Process Communication In VB.Net
http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/

.NET 3.5 Adds Named Pipes Support
http://www.switchonthecode.com/tutorials/dotnet-35-adds-named-pipes-support

Socket Send and Receive [C#]
http://www.csharp-examples.net/socket-send-receive/
0
 
LVL 25

Assisted Solution

by:apeter
apeter earned 400 total points
ID: 35376387
If slave and master application are in the same system and named pipe is the best choice.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Simple Linear Regression

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question