Click here to Skip to main content
16,005,178 members
Home / Discussions / C#
   

C#

 
QuestionMDI child problem... Pin
IamHuM17-Oct-06 3:45
IamHuM17-Oct-06 3:45 
AnswerRe: MDI child problem... Pin
Stefan Troschuetz17-Oct-06 4:18
Stefan Troschuetz17-Oct-06 4:18 
QuestionDataGridViewComboBoxColumn - Setting SelectedIndex Pin
KCI-VA17-Oct-06 3:31
KCI-VA17-Oct-06 3:31 
QuestionProblems with primary key Pin
mrclash88817-Oct-06 3:21
mrclash88817-Oct-06 3:21 
AnswerRe: Problems with primary key Pin
bearfx17-Oct-06 4:19
bearfx17-Oct-06 4:19 
AnswerRe: Problems with primary key Pin
Jim Conigliaro17-Oct-06 4:23
Jim Conigliaro17-Oct-06 4:23 
GeneralRe: Problems with primary key Pin
mrclash88817-Oct-06 4:43
mrclash88817-Oct-06 4:43 
QuestionTerminating multithreaded application Pin
Pseudonaja Cyanide17-Oct-06 3:16
Pseudonaja Cyanide17-Oct-06 3:16 
Hi,

Please excuse the lack of code. I don't have the source with me.

I'm builing an Server-Client based system and it's the first time I'm working with threading and socketing.

My UdpClient has a listener that's constantly waiting for incoming messages on a specific port. That listener runs on a seperate thread, which is defined in the class and the listen() method is handed as a new Threadstart.

Inside the method, the while loop checks if the application must continue listening before preparing to receive messages.

My problem is that when my application closes all the code terminates and runs out the bottom. But when I open Program Manager the process is still running and if the application starts again the port is already in use. Thus I must deduce that the listener thread did not terminate.

I tried calling the .Abort() method and it seems to work, but I can't manage to close the application completely.

My question is this: Is there a way to get a list of all threads started by my application and to terminate them manually?
Or alternatively: Is there a way I can force my application to terminate itself and all its threads?

"Build an idiot-proof application, and the world will create a bigger idiot."

AnswerRe: Terminating multithreaded application Pin
Stefan Troschuetz17-Oct-06 4:32
Stefan Troschuetz17-Oct-06 4:32 
GeneralRe: Terminating multithreaded application Pin
Pseudonaja Cyanide17-Oct-06 4:48
Pseudonaja Cyanide17-Oct-06 4:48 
GeneralRe: Terminating multithreaded application Pin
Pseudonaja Cyanide20-Oct-06 2:47
Pseudonaja Cyanide20-Oct-06 2:47 
QuestionPolicy Manager Pin
Super Lloyd17-Oct-06 2:44
Super Lloyd17-Oct-06 2:44 
AnswerRe: Policy Manager Pin
bearfx17-Oct-06 4:23
bearfx17-Oct-06 4:23 
GeneralRe: Policy Manager Pin
Super Lloyd17-Oct-06 12:52
Super Lloyd17-Oct-06 12:52 
Questionresizable movable borderless form? Pin
dolce_ckj17-Oct-06 2:36
dolce_ckj17-Oct-06 2:36 
AnswerRe: resizable movable borderless form? Pin
Martin#17-Oct-06 2:56
Martin#17-Oct-06 2:56 
AnswerRe: resizable movable borderless form? Pin
dolce_ckj17-Oct-06 22:18
dolce_ckj17-Oct-06 22:18 
QuestionHow to close a messagebox Pin
engsrini17-Oct-06 2:34
engsrini17-Oct-06 2:34 
AnswerRe: How to close a messagebox Pin
sam#17-Oct-06 2:58
sam#17-Oct-06 2:58 
GeneralRe: How to close a messagebox Pin
engsrini17-Oct-06 3:38
engsrini17-Oct-06 3:38 
AnswerRe: How to close a messagebox Pin
Guffa17-Oct-06 4:45
Guffa17-Oct-06 4:45 
GeneralRe: How to close a messagebox Pin
Dan Neely17-Oct-06 7:11
Dan Neely17-Oct-06 7:11 
QuestionProblem with set button.Image By Icon.` Pin
hdv21217-Oct-06 2:24
hdv21217-Oct-06 2:24 
QuestionHow to implement dinamicly an interface? Pin
nmpsantos17-Oct-06 1:39
nmpsantos17-Oct-06 1:39 
AnswerRe: How to implement dinamicly an interface? Pin
Stefan Troschuetz17-Oct-06 4:30
Stefan Troschuetz17-Oct-06 4:30 

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.