Develop GUI for Windows Service

  • Thread starter Thread starter Ahmad
  • Start date Start date
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
 
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
 
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
 
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
 
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
 
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?
 
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
 
Back
Top