Ron,
You can use .NET Remoting: the Windows Service would have a single remoting
object that raises an Event.
The Windows Forms app would handle this event (remotely) when it is running.
The Service would simply raise the event, it doesn't care if there is any
one is handling the event or not.
In fact multiple Forms apps could handle the event, and they would all be
notified!
Matthew MacDonald's book "Microsoft Visual Basic .NET Programmer's
Cookbook" from MS Press has a topic on "Fire an Event over a Remoting
Channel" that shows how, plus information on how to enable 1.1 to work.
Alternatively you use Message Queuing (MSMQ) via the System.Messagin g
namespace to send out messages, in this case I would have the message expire
in 2 minutes, not persist it, nor send it to the dead-letter queue, as the
message is simply notifying the client...
Hope this helps
Jay
"Ron Bremmers" <r.********@hom e.nl> wrote in message
news:cv******** **@news6.zwoll1 .ov.home.nl...
Hello,
I have a Windows Service which executes some code each 2 seconds.
Every 2 seconds I want to log the result in a Windows Forms application.
What is the best approach? I think it is .NET remoting, but when the
"client" application is not started, no logging has to be done. So the
service has to know if there is a client application to log to. How can I
do
that? Any suggestions?
Thanks!
Ron