Windows application can't exit

  • Thread starter Thread starter Conbine Guard
  • Start date Start date
C

Conbine Guard

Hi all
I have build an application with a windows.In the application i started a
new thread when i click the exit button the windows disappeared but the
taskmgr shows the application still runing
how to slove ?
 
Conbine said:
Hi all
I have build an application with a windows.In the application i started a
new thread when i click the exit button the windows disappeared but the
taskmgr shows the application still runing
how to slove ?

Hmm... Normally a thread should end too, when you close the
application. Maybe it would be helpful if you post the code for the
thread and for the ClickEvent of the Exit-Button.
 
The code is not secrecy ,it is used to capture wave data from the soundcard
..the exit is built by visual studio 2005 and i add nothing to closing
closed(and so on) event

private void OutPut()
{
while (true)
{
switch(WaitHandle.WaitAny(autoResetEventArray1))
{
case 0:
SoundCaptured((short[])captureBuffer1.Read(0,typeof(short),LockFlag.None,samplesInEvent));
break;
case 1:
SoundCaptured((short[])captureBuffer1.Read(samples *
2,typeof(short),LockFlag.None,samplesInEvent));
break;
}
}
}
 
Back
Top