Hi.
I am using thread function in my project. When I close program.exe(for m), it is still working at background and in task manager, i can see program.exe still working.
How can I close this program completely?
-----------------------------------------------------------
I am using thread function in my project. When I close program.exe(for m), it is still working at background and in task manager, i can see program.exe still working.
How can I close this program completely?
-----------------------------------------------------------
Code:
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();
}
}
}
Comment