Dear Sir,
I want to make two forms form1 and form2 after that i want to load the form1 for the specific time say 1 minute and close it and then open the form2.
How can i acheive this requirement.Plzzzzzzzzz give me the code for this as soon as possible.
Loading
Claudio MussoPosted Sep 1, 2011, 4:54 PM
The code of Vulpes is enough for doing the most difficult part of the job.
You just need to hide the mainform on start and add the unhide code to the tick event and you're done.
Sam HobbsPosted Aug 29, 2011, 1:16 AM
One way is to show both forms in the Main function (in the Program class in the Program.cs file). When the application is first generated, the Main function shows the main form. You can change it to first show the first form (the splash screen), then the main form. The splash screen form can set a timer itself (as Vulpes shows) but then in the timer tick event, the splash screen can just call Close() to close itself.
Sam HobbsPosted Sep 1, 2011, 10:22 PM
There are many ways to do splash screens, all with advantages and disadvantages. The following are two articles about splash screens in Windows Forms applications.
- Add a splash form to a windows application
- Using ApplicationContext to Encapsulate Splash Screen Functionality
Some splash screens are a bit more complicated because they support closing them when a key is pressed. Some splash screens are more complicated because the application does initialization while the splash screen is shown. If Rajesh were to specify more requirements then there is likely an existing article and/or sample to help.VulpesPosted Aug 28, 2011, 4:40 AM