Click here to Skip to main content
15,917,005 members
Home / Discussions / C#
   

C#

 
GeneralRe: Nunit for Databases Pin
OmegaMan11-Aug-05 11:00
OmegaMan11-Aug-05 11:00 
QuestionHow to programmatically set the focus on a selected tree node? Pin
bouli10-Aug-05 4:18
bouli10-Aug-05 4:18 
AnswerRe: How to programmatically set the focus on a selected tree node? Pin
Ankit Sgl10-Aug-05 4:26
Ankit Sgl10-Aug-05 4:26 
GeneralRe: How to programmatically set the focus on a selected tree node? Pin
bouli10-Aug-05 5:22
bouli10-Aug-05 5:22 
GeneralStopping Window Service to start Pin
Ankit Sgl10-Aug-05 4:11
Ankit Sgl10-Aug-05 4:11 
AnswerRe: Stopping Window Service to start Pin
Heath Stewart10-Aug-05 5:06
protectorHeath Stewart10-Aug-05 5:06 
Generalwindows service Pin
horacyjr10-Aug-05 3:18
horacyjr10-Aug-05 3:18 
GeneralRe: windows service Pin
Darryl Borden10-Aug-05 3:56
Darryl Borden10-Aug-05 3:56 
Use this code...

System.ServiceProcess.ServiceController scm = new System.ServiceProcess.ServiceController ("MyService","MyServer");

//then to start it...

scm.Start();

//or to stop it...

scm.Stop();

You might have to create a new instance of the service control manager object each time you want to start or stop the service. I use this same code in a number of applications and have never had a problem with it.

Darryl Borden
Principal IT Analyst
dborden@eprod.com
GeneralRe: windows service Pin
horacyjr10-Aug-05 4:10
horacyjr10-Aug-05 4:10 
GeneralRe: windows service Pin
Dave Kreskowiak10-Aug-05 12:09
mveDave Kreskowiak10-Aug-05 12:09 
Generalhook to capture these messages Pin
pjoseph99910-Aug-05 2:47
pjoseph99910-Aug-05 2:47 
GeneralRe: hook to capture these messages Pin
Alomgir Miah10-Aug-05 5:50
Alomgir Miah10-Aug-05 5:50 
GeneralRe: hook to capture these messages Pin
pjoseph99910-Aug-05 21:50
pjoseph99910-Aug-05 21:50 
QuestionDB the way to go? Pin
Morrgan10-Aug-05 1:28
Morrgan10-Aug-05 1:28 
AnswerRe: DB the way to go? Pin
Dario Solera10-Aug-05 1:37
Dario Solera10-Aug-05 1:37 
GeneralRe: DB the way to go? Pin
Morrgan10-Aug-05 6:07
Morrgan10-Aug-05 6:07 
AnswerRe: DB the way to go? Pin
Guffa10-Aug-05 6:51
Guffa10-Aug-05 6:51 
GeneralRe: DB the way to go? Pin
Morrgan10-Aug-05 7:40
Morrgan10-Aug-05 7:40 
GeneralForm Painting Pin
Greeky10-Aug-05 0:54
Greeky10-Aug-05 0:54 
GeneralRe: Form Painting Pin
Dario Solera10-Aug-05 1:17
Dario Solera10-Aug-05 1:17 
GeneralRe: Form Painting Pin
Greeky10-Aug-05 2:23
Greeky10-Aug-05 2:23 
Questionhow import dll of vc++ in c# Pin
laila1110-Aug-05 0:43
laila1110-Aug-05 0:43 
AnswerRe: how import dll of vc++ in c# Pin
Dario Solera10-Aug-05 1:25
Dario Solera10-Aug-05 1:25 
Generaldatabinding on a datagrid Pin
dhol10-Aug-05 0:20
dhol10-Aug-05 0:20 
GeneralDetermining if a string is a valid filename for system Pin
misterbear9-Aug-05 23:15
misterbear9-Aug-05 23:15 

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.