468,101 Members | 1,487 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,101 developers. It's quick & easy.

Communication between applications - HowTo

Hi,

how can I enable my standard windows form application to react to a
"trigger" from another application (not necessarily managed code)?

The application has conventional windows form features and is usually used
stand alone.
Additionally it should "listen" to requests from another aplication and
process them.

That should be done in the following manner:
1. The user of the second application requests a certain process.
2. The second application tries to transfer this request along with some
data to the .Net application.
3. If this .Net application is already running and not busy, it should react
and process the request.
Otherwise an error MessageBox should indicate that the .Net application has
to be started first.

What is the best way to implement this?

Thanks,
Dominik
Sep 9 '06 #1
2 10429
I'd usually use .NET remoting although if the other app isn't managed than
that makes the .NET remoting implementation trickier.

How about a database (or more simply a text file) that both applications
use, the first application writes to a certain table and the .NET
application checks the status of that table say every few seconds.

HTH

Simon

"Dominik Gorsler" <do*****@gorsler.netwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Hi,

how can I enable my standard windows form application to react to a
"trigger" from another application (not necessarily managed code)?

The application has conventional windows form features and is usually used
stand alone.
Additionally it should "listen" to requests from another aplication and
process them.

That should be done in the following manner:
1. The user of the second application requests a certain process.
2. The second application tries to transfer this request along with some
data to the .Net application.
3. If this .Net application is already running and not busy, it should
react
and process the request.
Otherwise an error MessageBox should indicate that the .Net application
has
to be started first.

What is the best way to implement this?

Thanks,
Dominik


Sep 9 '06 #2
first the other app which isnt .net needs to determine if the .net
application is available. I would personally check the running processes
list.
For communicating there are a number of ways, more efficient then querying a
database table every few seconds would be to place a filesystemwatcher on a
file which could be written too by app2.
You could also write networking code to communicate through a tcp socket.
This would then allow the apps to possibly be setup on different machines
(although getting a running process list is trickier across the network).

Ciaran O'Donnell

"Dominik Gorsler" wrote:
Hi,

how can I enable my standard windows form application to react to a
"trigger" from another application (not necessarily managed code)?

The application has conventional windows form features and is usually used
stand alone.
Additionally it should "listen" to requests from another aplication and
process them.

That should be done in the following manner:
1. The user of the second application requests a certain process.
2. The second application tries to transfer this request along with some
data to the .Net application.
3. If this .Net application is already running and not busy, it should react
and process the request.
Otherwise an error MessageBox should indicate that the .Net application has
to be started first.

What is the best way to implement this?

Thanks,
Dominik
Sep 9 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by james | last post: by
6 posts views Thread by Luke Vogel | last post: by
2 posts views Thread by decoy | last post: by
8 posts views Thread by panko | last post: by
6 posts views Thread by ecir.hana | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.