Click here to Skip to main content
15,890,438 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to close all form but not application.exit() Pin
OriginalGriff11-Feb-10 5:55
mveOriginalGriff11-Feb-10 5:55 
GeneralRe: How to close all form but not application.exit() Pin
nuttynibbles11-Feb-10 6:02
nuttynibbles11-Feb-10 6:02 
AnswerRe: How to close all form but not application.exit() Pin
#realJSOP11-Feb-10 6:00
mve#realJSOP11-Feb-10 6:00 
AnswerRe: How to close all form but not application.exit() Pin
SilimSayo11-Feb-10 9:17
SilimSayo11-Feb-10 9:17 
QuestionUsing Semaphore for multiple threads.... Pin
Jacob Dixon11-Feb-10 4:45
Jacob Dixon11-Feb-10 4:45 
AnswerRe: Using Semaphore for multiple threads.... Pin
N a v a n e e t h11-Feb-10 5:22
N a v a n e e t h11-Feb-10 5:22 
GeneralRe: Using Semaphore for multiple threads.... Pin
Jacob Dixon11-Feb-10 5:37
Jacob Dixon11-Feb-10 5:37 
AnswerRe: Using Semaphore for multiple threads.... Pin
Covean11-Feb-10 5:25
Covean11-Feb-10 5:25 
I would try to use async WMI calls.

ManagementObjectSearcher query = new ManagementObjectSearcher(managementScope, new ObjectQuery(szSelectStatement));
ManagementOperationObserver observer = new ManagementOperationObserver();
observer.CompletedEventHandler += /*someHandler...*/;
ManagementObjectCollection queryCollection = query.Get(observer);


Now you should wait for 2 events in your threads. The first event signals that your
query is completed. And the second event should signal that the thread should cancel
the query (observer.Cancel()).

Now you can sync your threads without having the need of abort them.
Greetings
Covean

GeneralRe: Using Semaphore for multiple threads.... Pin
Jacob Dixon11-Feb-10 5:40
Jacob Dixon11-Feb-10 5:40 
GeneralRe: Using Semaphore for multiple threads.... Pin
Jacob Dixon11-Feb-10 5:42
Jacob Dixon11-Feb-10 5:42 
GeneralRe: Using Semaphore for multiple threads.... Pin
Covean12-Feb-10 0:13
Covean12-Feb-10 0:13 
QuestionCreating a live service in c# Pin
Steve-Co11-Feb-10 4:29
Steve-Co11-Feb-10 4:29 
AnswerRe: Creating a live service in c# Pin
#realJSOP11-Feb-10 6:03
mve#realJSOP11-Feb-10 6:03 
GeneralRe: Creating a live service in c# Pin
Steve-Co11-Feb-10 23:32
Steve-Co11-Feb-10 23:32 
GeneralRe: Creating a live service in c# Pin
#realJSOP12-Feb-10 8:27
mve#realJSOP12-Feb-10 8:27 
GeneralRe: Creating a live service in c# Pin
#realJSOP14-Feb-10 8:19
mve#realJSOP14-Feb-10 8:19 
Questionaspx to Html page Pin
It_tech11-Feb-10 1:19
It_tech11-Feb-10 1:19 
AnswerRe: aspx to Html page Pin
loyal ginger11-Feb-10 1:33
loyal ginger11-Feb-10 1:33 
GeneralRe: aspx to Html page Pin
It_tech11-Feb-10 1:42
It_tech11-Feb-10 1:42 
GeneralRe: aspx to Html page Pin
It_tech11-Feb-10 2:46
It_tech11-Feb-10 2:46 
GeneralRe: aspx to Html page Pin
loyal ginger11-Feb-10 3:36
loyal ginger11-Feb-10 3:36 
GeneralRe: aspx to Html page Pin
It_tech11-Feb-10 4:07
It_tech11-Feb-10 4:07 
QuestionWebcam in c# Pin
aligokdemir11-Feb-10 0:44
aligokdemir11-Feb-10 0:44 
AnswerRe: Webcam in c# Pin
annathor11-Feb-10 1:45
annathor11-Feb-10 1:45 
AnswerRe: Webcam in c# Pin
Mark H Bishop11-Feb-10 2:09
Mark H Bishop11-Feb-10 2:09 

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.