Develop GUI for Windows Service

A

Ahmad

Hi,

I have developed a Windows Service using .NET. The service connects
with a server using TCP/IP. When the Service receives a message it
process this message like making some database entries etc.

Now I want to develop a GUI. Which will monitor the Service and will
display the messages received from server on some RichTextBox type
control.

What I am thinking to do this is to log the messages received from
server into some file and in GUI use FileSystemWatcher control to
monitor the file and on file change reload the file into the GUI.

But now I am being asked to make the GUI such a way that when the GUI
is started it must not load all the messages received before the GUI
launch. It must only display the messages received after the GUI
Launch.

So I am not sure what to do for this new requirement. I think I will
have to do some remoting like thing.

Kindly help me to resolve this issue.

Thanks in anticipation.

Regards,

Ahmad Jalil Qarshi
 
H

Henning Krause [MVP - Exchange]

Hi,

if you are using Windows XP or later you should consider using WCF here. It
allows you to communicate between the to processes.

Kind regards,
Henning Krause
 
A

Ahmad

Thanks Henning,

I am using .NET 2.0. So I can't use WCF. Is there any solution for
that in .NET 2.0.

Regards,

Ahmad Jalil Qarshi
 
H

Henning Krause [MVP - Exchange]

Hi,

you could use Remoting in this case. The IPC Channel is available in .NET
2.0, allowing fast inter-process communication via Shared Memory.

Kind regards,
Henning Krause
 
H

Henning Krause [MVP - Exchange]

Hi,

I don't think this will work, as the OP is using a Windows service which (a)
runs on another desktop on the same machine and (b) has no message pump...

Kind regards,
Henning Krause
 
M

Mr. Arnold

Henning Krause said:
Hi,

I don't think this will work, as the OP is using a Windows service which
(a) runs on another desktop on the same machine and (b) has no message
pump...

What do you mean runs on another desktop on the same machine?
 
H

Henning Krause [MVP - Exchange]

Hi,

I think the correct term is window station, not desktop.

Services always run in station zero. Till Windows XP/2003, the first user
who logs on also gets window station zero. All subsequent users (terminal
services/remote desktop, fast user switching) get their own stations,
isolated from the other.

Starting with Vista, even the first user gets its own station. This is one
of the reasons the "Allow service to interact with desktop" does not work
any more.

Kind regards,
Henning Krause
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top