От: | mDmitriy | ||
Дата: | 17.09.14 10:33 | ||
Оценка: |
public class ThreadUIClass1 : IDisposable
{
private Thread _thread;
private Form _myForm;
public void RunThread()
{
_thread = new Thread(RunApp);
_thread.Start();
}
private void RunApp(object obj)
{
_myForm = new Form();
Application.Run(_myForm);
}
public void Dispose()
{
try
{
if (_myForm != null)
{
_myForm.Dispose();
}
}
catch (Exception e)
{
}
}
}