Windows Service with a Windows Form

  • Thread starter Thread starter Mr Utkal Ranjan Pradhan
  • Start date Start date
M

Mr Utkal Ranjan Pradhan

Hi Friends
I want to develop a windows service application, which will open a port on
the machine and constantly it will listen from that port. And when any data
comes to that port I want to display a Form with the data that has been
receieved by the port. So plz guide me to do that.

Can it be possible to display a form when any data comes to that port ????

Mr Utkal Ranjan, New Delhi.
 
Mr said:
I want to develop a windows service application, which will open a
port on the machine and constantly it will listen from that port. And
when any data comes to that port I want to display a Form with the
data that has been receieved by the port. So plz guide me to do that.

Can it be possible to display a form when any data comes to that port
????

Normally, a windows service doesn't interact with the desktop directly.
You don't want to display a form when no user is logged on, do you? The
usual way of handling such requirements is to have a separate
application that is run by the user or installed in her startup folder.
The service and the application will communicate via standard IPC
methods.
 
There is an example program called Wintalk that was installed with my
VB.NET Standard Edition, and is probably found with the other .NET product
installations available. Maybe somebody would know if Wintalk is freely
available for download somehow, if you don't have a .NET product? I think
that if you look at the Wintalk sample program, it may help you learn what
you are trying to do. It is a simple chatting program, but I think uses the
same principles that you are wanting.

On my machine it is located in the following folders, but maybe someplace
else for other folks:

"C:\Program Files\Microsoft Visual Studio
..NET\FrameworkSDK\Samples\Applications\Wintalk"
- Version 2002

"C:\Program Files\Microsoft Visual Studio .NET
2003\SDK\v1.1\Samples\Applications\Wintalk"
- Version 2003

~Brian
 
* "Mr Utkal Ranjan Pradhan said:
I want to develop a windows service application, which will open a port on
the machine and constantly it will listen from that port. And when any data
comes to that port I want to display a Form with the data that has been
receieved by the port. So plz guide me to do that.

Create a 2nd application with the GUI which communicates with the
service (maybe using remoting, ...).

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
 
Back
Top