Click here to Skip to main content
15,920,508 members
Home / Discussions / C#
   

C#

 
GeneralRe: Implementing Windows Application as a Windows Service Pin
queries36517-Dec-08 22:44
queries36517-Dec-08 22:44 
GeneralRe: Implementing Windows Application as a Windows Service Pin
Simon P Stevens18-Dec-08 1:40
Simon P Stevens18-Dec-08 1:40 
GeneralRe: Implementing Windows Application as a Windows Service Pin
queries36518-Dec-08 2:44
queries36518-Dec-08 2:44 
GeneralRe: Implementing Windows Application as a Windows Service Pin
Simon P Stevens18-Dec-08 2:51
Simon P Stevens18-Dec-08 2:51 
GeneralRe: Implementing Windows Application as a Windows Service Pin
queries36518-Dec-08 3:48
queries36518-Dec-08 3:48 
GeneralRe: Implementing Windows Application as a Windows Service Pin
Simon P Stevens18-Dec-08 4:11
Simon P Stevens18-Dec-08 4:11 
GeneralRe: Implementing Windows Application as a Windows Service Pin
queries36518-Dec-08 19:52
queries36518-Dec-08 19:52 
GeneralRe: Implementing Windows Application as a Windows Service Pin
Simon P Stevens18-Dec-08 21:48
Simon P Stevens18-Dec-08 21:48 
Windows services should not have GUIs. XP does not allow it by default, and Vista blocks it totally. I've never seen a GUI app running as a service, and I would suspect what your thinking is a service actually isn't.

What you should do is this.

Write a windows service that monitors the temperature. Then write a separate GUI app that communicates with the service to display the information to the user, and allow them to change any settings you want.

To write the service, you just follow the tutorials. You have to implement the various OnStart(), OnStop(), OnSuspend() methods. Your OnStart() method should create any required objects and begin taking the temperature readings. For example, it could create a Timer that triggers a temperature reading every second maybe. In the OnStop() method you need to stop your timer and dispose of anything that needs clearing up.

You then write a separate GUI app that the user can run from the start menu. This communicates with the service (You can use .net remoting, or WCF, or whatever you fancy) to retrieve the temperate from the running service and display it to the user. If you need to GUI app to run as soon as windows starts you can put a link in the startup folder, or add a registry key in the places I've already mentioned.

This way you have a service doing the temperature logging, so can be logging from as soon as windows is on, before the user logs on. And you have a GUI app to display the info to the user that they control and isn't running as a service.

Simon

GeneralRe: Implementing Windows Application as a Windows Service Pin
queries36518-Dec-08 22:27
queries36518-Dec-08 22:27 
GeneralRe: Implementing Windows Application as a Windows Service Pin
Simon P Stevens19-Dec-08 1:27
Simon P Stevens19-Dec-08 1:27 
AnswerRe: Implementing Windows Application as a Windows Service Pin
Dave Kreskowiak17-Dec-08 2:21
mveDave Kreskowiak17-Dec-08 2:21 
GeneralRe: Implementing Windows Application as a Windows Service Pin
queries36517-Dec-08 22:55
queries36517-Dec-08 22:55 
GeneralRe: Implementing Windows Application as a Windows Service Pin
Dave Kreskowiak18-Dec-08 2:04
mveDave Kreskowiak18-Dec-08 2:04 
GeneralRe: Implementing Windows Application as a Windows Service Pin
queries36518-Dec-08 2:33
queries36518-Dec-08 2:33 
GeneralRe: Implementing Windows Application as a Windows Service Pin
Dave Kreskowiak18-Dec-08 16:32
mveDave Kreskowiak18-Dec-08 16:32 
GeneralRe: Implementing Windows Application as a Windows Service Pin
queries36518-Dec-08 19:59
queries36518-Dec-08 19:59 
GeneralRe: Implementing Windows Application as a Windows Service Pin
Dave Kreskowiak19-Dec-08 1:30
mveDave Kreskowiak19-Dec-08 1:30 
QuestionCode for Checkboxes / radio button at the time of Windows Setup Installer Pin
shavil17-Dec-08 1:05
shavil17-Dec-08 1:05 
Questionhindi font to its unicode Pin
Member 441328317-Dec-08 0:49
Member 441328317-Dec-08 0:49 
AnswerRe: hindi font to its unicode Pin
N a v a n e e t h17-Dec-08 0:57
N a v a n e e t h17-Dec-08 0:57 
GeneralRe: hindi font to its unicode Pin
Xmen Real 17-Dec-08 2:00
professional Xmen Real 17-Dec-08 2:00 
AnswerRe: hindi font to its unicode [modified] Pin
Leeladhar Ladia8-Apr-09 22:09
Leeladhar Ladia8-Apr-09 22:09 
QuestionMysterious Group Box Control Pin
musefan17-Dec-08 0:42
musefan17-Dec-08 0:42 
AnswerRe: Mysterious Group Box Control Pin
#realJSOP17-Dec-08 1:08
professional#realJSOP17-Dec-08 1:08 
GeneralRe: Mysterious Group Box Control Pin
musefan17-Dec-08 5:29
musefan17-Dec-08 5:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.