Click here to Skip to main content
15,903,201 members
Home / Discussions / C#
   

C#

 
AnswerRe: Modal Dialog help in C# Pin
Alexander Wiseman28-Jun-06 15:41
Alexander Wiseman28-Jun-06 15:41 
QuestionRe: Modal Dialog help in C# [modified] Pin
Martin#28-Jun-06 19:34
Martin#28-Jun-06 19:34 
AnswerRe: Modal Dialog help in C# Pin
Alexander Wiseman29-Jun-06 5:39
Alexander Wiseman29-Jun-06 5:39 
GeneralRe: Modal Dialog help in C# [modified] Pin
Martin#29-Jun-06 6:11
Martin#29-Jun-06 6:11 
GeneralRe: Modal Dialog help in C# Pin
Alexander Wiseman29-Jun-06 6:30
Alexander Wiseman29-Jun-06 6:30 
GeneralRe: Modal Dialog help in C# Pin
Martin#29-Jun-06 6:41
Martin#29-Jun-06 6:41 
GeneralRe: Modal Dialog help in C# Pin
McSmack29-Jun-06 6:00
McSmack29-Jun-06 6:00 
QuestionRe: Modal Dialog help in C# Pin
Alexander Wiseman29-Jun-06 6:41
Alexander Wiseman29-Jun-06 6:41 
There is a way to terminate a thread, but it is not generally the best way to deal with a thread which needs to be stopped. The best way is to simply exit out of the function which the thread is processing, which should stop the thread. This may be different, however, depending on how your second thread was created.

So, how is your second thread created? From your first post, it sounds like you are not explicitly creating the thread (with code like Thread myThread = new Thread(new ThreadStart(SomeFunctionToProcess));). It sounds rather like a thread is being created by a component you are using and that thread executes the callback code, part of which is calling the ShowMyDialogBox function.

If you do not know how the second thread is being created, try this: inside the callback function (the function which calls the ShowMyDialogBox function) make sure that the function ends after the call to ShowMyDialogBox. Also make sure that after the call to BeginInvoke in the ShowMyDialogBox function you have the return keyword - this will force the secondary thread to quit the ShowMyDialogBox after it tells the main thread to process the function with the BeginInvoke function.

Final question: what is the method signature of your callback function? Specifically, what are the parameters?

If you can get me the answers to these few questions, I should be able to help you out.

Sincerely,
Alexander Wiseman
AnswerRe: Modal Dialog help in C# Pin
McSmack29-Jun-06 7:17
McSmack29-Jun-06 7:17 
QuestionRe: Modal Dialog help in C# Pin
Alexander Wiseman29-Jun-06 10:53
Alexander Wiseman29-Jun-06 10:53 
AnswerRe: Modal Dialog help in C# Pin
McSmack29-Jun-06 12:19
McSmack29-Jun-06 12:19 
GeneralRe: Modal Dialog help in C# Pin
Alexander Wiseman29-Jun-06 12:54
Alexander Wiseman29-Jun-06 12:54 
QuestionQuick button question [modified] Pin
Arkon94828-Jun-06 13:05
Arkon94828-Jun-06 13:05 
AnswerRe: Quick button question [modified] Pin
Mike Poz28-Jun-06 13:45
Mike Poz28-Jun-06 13:45 
QuestionExporting to SPSS issue Pin
Nader Elshehabi28-Jun-06 11:59
Nader Elshehabi28-Jun-06 11:59 
AnswerRe: Exporting to SPSS issue Pin
farquem828-Jun-06 16:01
farquem828-Jun-06 16:01 
GeneralRe: Exporting to SPSS issue Pin
Nader Elshehabi28-Jun-06 17:29
Nader Elshehabi28-Jun-06 17:29 
QuestionASP.net and Javascript Pin
Naji.A28-Jun-06 11:27
Naji.A28-Jun-06 11:27 
AnswerRe: ASP.net and Javascript Pin
Guffa28-Jun-06 12:06
Guffa28-Jun-06 12:06 
GeneralAny helpful hints? Pin
Naji.A28-Jun-06 12:12
Naji.A28-Jun-06 12:12 
AnswerRe: Any helpful hints? Pin
Guffa28-Jun-06 19:31
Guffa28-Jun-06 19:31 
GeneralError Messages? [modified] Pin
Naji.A29-Jun-06 22:01
Naji.A29-Jun-06 22:01 
AnswerRe: Error Messages? Pin
Guffa30-Jun-06 5:25
Guffa30-Jun-06 5:25 
GeneralDon't see any error messages!!! [modified] Pin
Naji.A30-Jun-06 11:44
Naji.A30-Jun-06 11:44 
GeneralRe: Don't see any error messages!!! Pin
Guffa1-Jul-06 4:47
Guffa1-Jul-06 4:47 

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.