Click here to Skip to main content
15,906,626 members
Home / Discussions / C#
   

C#

 
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 
queries365 wrote:
I have seen GUI-based application working as Windows service


Does that mean it's a good idea?? Nope.

The OnStart method is used to start your worker threads that do the actual work of the service. If you have no idea who threading works or how to start a thread, your dead in the water.

Services do not have a GUI because, 1, there is no message pump to drive form events, 2, the OnStart method only ever fires once in the life of a service, so there's no way to get a GUI going and keep it going, and 3, OnStart fires, even if theres noone logged into the machine! If there's noone logged in, there's no desktop to show the form on.

Yeah, it's possible to do, but you have to have advanced knowledge of services and how Windows works in order to pull it off. This is information that could cover and entire book and is well beyond the capacity of a few forum posts to explain.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




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 
GeneralRe: Mysterious Group Box Control Pin
#realJSOP17-Dec-08 7:19
professional#realJSOP17-Dec-08 7:19 
QuestionGridView HeaderText Horizontaly Pin
EBeylo17-Dec-08 0:40
EBeylo17-Dec-08 0:40 
AnswerRe: GridView HeaderText Horizontaly Pin
Dave Kreskowiak17-Dec-08 2:18
mveDave Kreskowiak17-Dec-08 2:18 
GeneralRe: GridView HeaderText Horizontaly Pin
EBeylo17-Dec-08 2:59
EBeylo17-Dec-08 2:59 
GeneralRe: GridView HeaderText Horizontaly Pin
Lev Danielyan17-Dec-08 3:19
Lev Danielyan17-Dec-08 3:19 
GeneralRe: GridView HeaderText Horizontaly Pin
Dave Kreskowiak17-Dec-08 12:33
mveDave Kreskowiak17-Dec-08 12:33 
GeneralRe: GridView HeaderText Horizontaly Pin
Lev Danielyan17-Dec-08 18:39
Lev Danielyan17-Dec-08 18:39 
QuestionButton? Pin
dec8216-Dec-08 23:59
dec8216-Dec-08 23:59 
AnswerRe: Button? Pin
N a v a n e e t h17-Dec-08 0:01
N a v a n e e t h17-Dec-08 0:01 

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.