473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Windows application can't exit

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 ?
Nov 6 '06 #1
2 1033

Conbine Guard schrieb:
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.

Nov 6 '06 #2
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;
}
}
}
"Norman Chong" <no*********@freenet.de>
??????:11********************@k70g2000cwa.googlegr oups.com...
>
Conbine Guard schrieb:
>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.

Nov 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Elp | last post by:
Hi, I've a very strange bug happening in my application (done in C#). It only happens with Windows 98, with either the .NET framework 1.0 or 1.1: i'm creating the main form of the application...
2
by: Ron L | last post by:
I have an MDI application which opens a number of child windows, each of which could have data in a state that needs to be saved. Each child window catches its Closing event and cancels it if the...
5
by: RAJ | last post by:
hi plz tell me how to know "how window is going to close"... i have to right code for X button of forms... plz telll me thanks bye
1
by: sidd | last post by:
Hi all, how do i exit out(unload) of a windows service in case of an error. so i have a code block as follows try { } catch(exception ex) { //log to event log
14
by: | last post by:
Hi All, I am little confused here, hope you can help me. While processing WM_POWERBROADCAST (wParam=PBT_APMQUERYSUSPEND), I MUST to do some lengthy operation(30 sec) before system Suspends or...
8
by: Zeno Lee | last post by:
What is the best way to return an exit code from a VB.NET windows forms app? My Forms application is dual purpose. It is an interactive windows app. It is also automated and run via a script and...
4
by: Markus Stoeger | last post by:
Hi, I have a problem with Application.Run() when Windows is shutting down. Please have a look at the copy&paste example program below. The application has no forms. It has only got a notify...
1
by: nido | last post by:
Develop a windows based drawing application. This application is used for drawing different primitive figures with different colors, brushes, x coordinate, y coordinate and other different...
3
by: Anthony P. | last post by:
Hello Everyone, I am writing a Windows Mobile 5.0 application using VS 2..8 in VB.NET. When someone clicks the "Exit" menu option, which generates a button_click() event, I find it easy to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.