So you are saying:
1) Fast code that doesn't do anything is better than...
2) Code that does not work at all is better than....
3) Code that works?
I think you have that backwards because you must first have working code before you can optimize it and make it more efficient.
thank you
I was having troubles with the end of the application
good tutorial
and for timer1 code just double click on the timer
Awesome dude.....thanks for this...just as I wanted for my project![]()
That is a great tutorial. I've started 2 implemant it in my skul assgnments. Big ups!
I was wondering if u added a progressBar to the splash, will it nid u to delay the timer.
Just found this. Major help for a newbie to C#. +rep
Hey! Nice Article!
I just though I could shed some light on this specific section of the article. The reason you need to add Application.Exit() is because When you use
Application.Run(splash), this is because this begins running the standard application message loop on the current thread and adds an event handler to Closed for the splash screen to Call Exit Thread.
If it were Form1 that were called with Application.Start, it should terminate the application when that main form is closed.
One possible work wound would be something to the effect of....
And then of course changing the timer code to just :Code:main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); (new Splash()).ShowDialog(); Application.Run(new Form1()); }
Anyways, just thought I'd share. Again, nice article!Code:this.Close();
Last edited by sam_coder; 12-09-2010 at 10:28 AM. Reason: messed up my closing CODE tag...
When I add the code in the timer1 it comes up as:
It has a red squiggly line under MainForm.Show; and the semi colon before it, why is this?Code:Form1 MainForm = new Form1; MainForm.Show; timer1.Enabled = false; this.Dispose(false);
show is a method
try MainForm.Show();
also for new Form1, you will need
Form1 MainForm = new Form1();
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks