Solved

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

Posted on 2011-03-17
6
398 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 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 400 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 100 total points
ID: 35376387
If slave and master application are in the same system and named pipe is the best choice.
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Suggested Solutions

A short article about problems I had with the new location API and permissions in Marshmallow
This is about my first experience with programming Arduino.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

734 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