473,387 Members | 3,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Windows Service Application from Windows application

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...

--
--Eric Cathell, MCSA
Nov 21 '05 #1
2 1113
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.
"ECathell" <ec******@nospam.com> wrote in message
news:eJ**************@TK2MSFTNGP09.phx.gbl...
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...

--
--Eric Cathell, MCSA
Nov 21 '05 #2
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...
--
--Eric Cathell, MCSA
"Jim Underwood" <ja*************@fallonclinic.com> wrote in message
news:uA**************@tk2msftngp13.phx.gbl...
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.
"ECathell" <ec******@nospam.com> wrote in message
news:eJ**************@TK2MSFTNGP09.phx.gbl...
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...

--
--Eric Cathell, MCSA

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: SP | last post by:
Hi All, I wrote a windows service which is supposed to stop after specified amount of time. I am calling OnStop() after specified time. OnStop() methods executed but I dont see the service...
5
by: pberna | last post by:
Dear all, I built a Web Form application to start and stop a Windows Service remotely. I successful tested the application on Windows 2000 server + IIS. I must include the ASPNET user to the...
4
by: Blaxer | last post by:
I have read approximately 30 articles now on various methods to make your vb.net application automatically update itself and I can't see how they apply to a vb.net windows services projects. The...
2
by: deko | last post by:
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post . It was suggested that if the service needs to interact with a WinForms app...
7
by: Ahmed Perlom | last post by:
Hi all, I am trying to start a windows application that has a GUI from a Windows service written in .NET 2.0. I have been searching on this for few days now with no avail. When using the...
4
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
3
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web...
5
by: sonali_reddy123 | last post by:
Hello all, I am trying to develop an application which will run as a windows service. The application should have Normal options available with service like start, stop and pause but along...
0
by: =?Utf-8?B?U2ltb25EZXY=?= | last post by:
Hi All I would like to install the same Windows Service project on the same server under different names, one for each customer. I have been able to do it but I would like an expert opinion as...
2
by: =?Utf-8?B?dmlzaHJ1dGg=?= | last post by:
Hi, I have 2 applications running, one Windows application project and the other windows services project. I want to call my Windows application in my windows services. I want to run them as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.