using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Data;
|
using System.Drawing;
|
using System.Linq;
|
using System.Text;
|
using System.Windows.Forms;
|
using System.Threading;
|
|
namespace M423project
|
{
|
public partial class FormStartup : Form
|
{
|
public FormStartup()
|
{
|
InitializeComponent();
|
}
|
|
public void CloseMe(object o, EventArgs e)
|
{
|
this.Close();
|
}
|
|
public static void LoadAndRun(Form form)
|
{
|
|
form.HandleCreated += delegate
|
{
|
new Thread(new ThreadStart(delegate
|
{
|
FormStartup formStartup = new FormStartup();
|
form.Shown += delegate
|
{
|
formStartup.Invoke(new EventHandler(formStartup.CloseMe));
|
formStartup.Dispose();
|
form.WindowState = FormWindowState.Maximized;
|
};
|
Application.Run(formStartup);
|
})).Start();
|
};
|
|
Application.Run(form);
|
}
|
|
private void timer1_Tick(object sender, EventArgs e)
|
{
|
progressBar1.Value++;
|
}
|
}
|
}
|