Click here to Skip to main content
15,885,216 members
Home / Discussions / C#
   

C#

 
GeneralRe: calling a method in c++ from c# Pin
N a v a n e e t h17-Feb-13 5:02
N a v a n e e t h17-Feb-13 5:02 
GeneralRe: calling a method in c++ from c# Pin
bonosa13-Feb-13 6:48
bonosa13-Feb-13 6:48 
QuestionDynamic Form Creation/Layout Pin
Matt U.12-Feb-13 4:21
Matt U.12-Feb-13 4:21 
AnswerRe: Dynamic Form Creation/Layout Pin
Orjan Westin12-Feb-13 6:16
professionalOrjan Westin12-Feb-13 6:16 
GeneralRe: Dynamic Form Creation/Layout Pin
Matt U.12-Feb-13 6:51
Matt U.12-Feb-13 6:51 
AnswerRe: Dynamic Form Creation/Layout Pin
PIEBALDconsult12-Feb-13 12:36
mvePIEBALDconsult12-Feb-13 12:36 
QuestionException: Cannot open Servicexxx service on computer 'COMPUTER_NAME' Pin
NarVish12-Feb-13 1:18
NarVish12-Feb-13 1:18 
AnswerRe: Exception: Cannot open Servicexxx service on computer 'COMPUTER_NAME' Pin
N a v a n e e t h12-Feb-13 1:36
N a v a n e e t h12-Feb-13 1:36 
NarVish wrote:
if (sc.Status.ToString().Equals("Stopped"))
Correct way to do the check is
if (sc.Status == ServiceControllerStatus.Stopped) {
   sc.Start();
}


NarVish wrote:
I would like to ask for credentials before the user tries to start service.
Read about Application manifest and UAC[^].

If you need administrator privilege only for starting the service, you could delay request for elevation till you need it. This can be done by starting a new process and setting ProcessStartInfo.Verb[^] to runas. This new process can execute the code to start/stop the service. You need the new process because you can't change elevation levels of the current process while it is running.
Best wishes,
Navaneeth

AnswerRe: Exception: Cannot open Servicexxx service on computer 'COMPUTER_NAME' Pin
Dave Kreskowiak12-Feb-13 2:05
mveDave Kreskowiak12-Feb-13 2:05 
QuestionHow can I allow selected rows in a DataGridView (DGV) to be moved up or down in a button click. Pin
susanna.floora11-Feb-13 22:50
susanna.floora11-Feb-13 22:50 
AnswerRe: How can I allow selected rows in a DataGridView (DGV) to be moved up or down in a button click. Pin
Richard MacCutchan12-Feb-13 0:27
mveRichard MacCutchan12-Feb-13 0:27 
GeneralRe: How can I allow selected rows in a DataGridView (DGV) to be moved up or down in a button click. Pin
susanna.floora12-Feb-13 0:56
susanna.floora12-Feb-13 0:56 
Questioncontrol robots with c# !? Pin
ali_heidari_11-Feb-13 21:47
ali_heidari_11-Feb-13 21:47 
AnswerRe: control robots with c# !? Pin
Pete O'Hanlon11-Feb-13 22:11
mvePete O'Hanlon11-Feb-13 22:11 
AnswerRe: control robots with c# !? Pin
Jibesh11-Feb-13 22:19
professionalJibesh11-Feb-13 22:19 
Questiongame with Object-oriented programming Pin
saber_ershadi11-Feb-13 21:22
saber_ershadi11-Feb-13 21:22 
AnswerRe: game with Object-oriented programming Pin
Jibesh11-Feb-13 22:22
professionalJibesh11-Feb-13 22:22 
GeneralRe: game with Object-oriented programming Pin
saber_ershadi11-Feb-13 23:55
saber_ershadi11-Feb-13 23:55 
GeneralRe: game with Object-oriented programming Pin
lukeer12-Feb-13 19:32
lukeer12-Feb-13 19:32 
AnswerRe: game with Object-oriented programming Pin
Richard MacCutchan11-Feb-13 22:22
mveRichard MacCutchan11-Feb-13 22:22 
AnswerRe: game with Object-oriented programming Pin
Thomas Daniels12-Feb-13 2:18
mentorThomas Daniels12-Feb-13 2:18 
QuestionHow to encryp video file and decrypt ? Pin
saber_ershadi11-Feb-13 6:10
saber_ershadi11-Feb-13 6:10 
AnswerRe: How to encryp video file and decrypt ? Pin
Richard MacCutchan11-Feb-13 6:31
mveRichard MacCutchan11-Feb-13 6:31 
AnswerRe: How to encryp video file and decrypt ? Pin
Dave Kreskowiak11-Feb-13 7:29
mveDave Kreskowiak11-Feb-13 7:29 
AnswerRe: How to encryp video file and decrypt ? Pin
Albert Holguin11-Feb-13 15:42
professionalAlbert Holguin11-Feb-13 15:42 

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.