static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     calculatorForm = new CalculatorForm(); //instantiate a new object of calculator form
     Application.Run(new SplashForm());
 }
Пример #2
0
        /// <summary>
        /// This is the event handler for the "Tick" event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SplashFormTimer_Tick(object sender, EventArgs e)
        {
            // To remove SplashForm in three seconds replaced by CalculatorForm created new object
            CalculatorForm calculatorForm = new CalculatorForm();

            calculatorForm.Show();           //method that shows CalculatorForm

            this.Hide();                     //method hides SplashForm when timer triggers in three seconds.
            SplashFormTimer.Enabled = false; //it triggers only once in three seconds (turns timer off as soon as timer triggers)
        }