TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
yokzu
NA
306
0
Closing thread
Jan 3 2010 3:59 PM
Hi.
I am using thread function in my project. When I close program.exe(form), it is still working on background and in task manager, i can see program.exe still working.
How can I close this program completely?
public void Form1_Load(object sender, EventArgs e)
{
CheckForIllegalCrossThreadCalls = false;
Thread thread_dinleyici = new Thread(new ThreadStart(dinle));
thread_dinleyici.Start();
}
public void dinle()
{
....
while(true)
{
istemcisoketi = tcp_listener.AcceptSocket();
if (istemcisoketi.Connected)
{
...
while (rdr_gonderilecek.Read())
{
gonderilecek_data += rdr_gonderilecek["iletiler"].ToString();
}
TcpClient tcp_client = new TcpClient(karsi_ip, 30001);
ag_akimi = tcp_client.GetStream();
akim_yazici = new StreamWriter(ag_akimi);
akim_yazici.WriteLine(gonderilecek_data);
akim_yazici.Flush();
}
}
}
Reply
Answers (
3
)
Writing to next line
invoicing app