I'm trying to screw to the current application, which is located on Form1 running Form2 as a splash screen. But when I try to compile the whole thing, I get an error CS0017 (several entry points for the program are defined).
I understand that I have an entry point on Form1 in the form of InitializeComponent (); But I do not quite understand what to do.
Here is the code:
static void Main() { { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Form2 first = new Form2(); DateTime end = DateTime.Now + TimeSpan.FromSeconds(5); first.Show(); while(end>DateTime.Now) { Application.DoEvents(); } first.Close(); first.Dispose(); Application.Run(new Form1()); } } public Form1() { InitializeComponent(); start_game(); }
Main
- Grundy