How to properly start a new form (which only shows logo.jpg) as a new thread and kill in a different (no time limit) moment? I have a working solution like below, but I guess aborting is not the best option - sometimes form stays after closing the main program, until mouse moves over. Please advise how to make it better ...
//field declarations:
frmLogo frmStart = new frmLogo();
private Thread startLogoThread;
public main()
{
this.startLogoThread = new Thread(new ThreadStart(this.frmLogoStart));
this.startLogoThread.Start();
InitializeComponent();
}
private void frmLogoStart()
{
System.Windows.Forms.Application.Run(frmStart);
}
private void mainForm_Load(object sender, EventArgs e)
{
// loading of SQL
// this is a point where I want to kill the logo thread
this.startLogoThread.Abort();
this.BringToFront();
}