Hi,
i have a problem to restart a thread in vb.net.
suppose i have a function called sendfile() that send file over a socket, first time i click the button the file was sent successfully, the button_click event will call thread1.start(), so when i click then button for the second time, an exception is thrown says that "Thread is running or Terminated; it cannot restart.".
so my goal is to re-use the thread1 that run the fucntion sendfile(), any solutions ?
i have a problem to restart a thread in vb.net.
suppose i have a function called sendfile() that send file over a socket, first time i click the button the file was sent successfully, the button_click event will call thread1.start(), so when i click then button for the second time, an exception is thrown says that "Thread is running or Terminated; it cannot restart.".
so my goal is to re-use the thread1 that run the fucntion sendfile(), any solutions ?