Windows Service Application from Windows application

E

ECathell

I have an application that I have been using for quite a while. It runs a print queue for remote printers connected over TCP/IP. It reads from a print_queue on a database server then sends the job to the correct printer. Its been working well for 3 years now. However I want to convert it so that it runs as a service(if the application gets closed the printers are down and product flow stops). I have my service application setup, and it appears to work and load the pallet program, however it does not show the monitoring form associated with the application. So I cannot for sure guarantee that it is running.. How can I do this? as well as minimize it to the system tray?

I have followed the tutorials that I have found, but I don't need to constantly write to the eventlog or monitor file access...
 
J

Jim Underwood

I'm not too familiar with creating services, but by definition I think they
run wihtout a logged in user, meaning they will not display any UI because
they do not run on the desktop, but rather in the background.

If you want to track what the service is doing, there are certain ways to
make the OS aware of the service's status (it may even happen by default
when you install it as a service).

I can't tell you the code for this, but a simple and dirty solution is to
write to a log file or database table. Maybe make an entry every minute
stating the time/date and that the application is running.


I have an application that I have been using for quite a while. It runs a
print queue for remote printers connected over TCP/IP. It reads from a
print_queue on a database server then sends the job to the correct printer.
Its been working well for 3 years now. However I want to convert it so that
it runs as a service(if the application gets closed the printers are down
and product flow stops). I have my service application setup, and it appears
to work and load the pallet program, however it does not show the monitoring
form associated with the application. So I cannot for sure guarantee that it
is running.. How can I do this? as well as minimize it to the system tray?

I have followed the tutorials that I have found, but I don't need to
constantly write to the eventlog or monitor file access...
 
E

ECathell

Thanks for the reply.

I am looking into now simply running the service, but then find
someway(remoting and reflection?) to attach to it to monitor it. I know it
can be done because that is the way several programs I use appear to
work(sql server manager being one, Avalanche Wavelink another)

The base process or agent runs as a service then they have a GUI manager
that either displays the status(sql) or actually let you manage the agent
process(avalanche). I think thats the route I am going to try and take...but
its gonna be a challenge methinks...
 

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