Beispiel #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Initialize SplashForm
            Program.mySplashForm = new SplashForm();
            //Initial CalculatorForm
            Program.myCalculatorForm = new CalculatorForm();
            Application.Run(Program.mySplashForm);
        }
        private void SplashFormTimer_Tick(object sender, EventArgs e)
        {
            // 1. Initialize the next form
            CalculatorForm calculatorForm = new CalculatorForm();

            // 2. create a refernace to the parentform
            calculatorForm.parentForm    = this;
            this.SplashFormTimer.Enabled = false;
            this.Hide();
            Program.myCalculatorForm.Show();
        }
Beispiel #3
0
        private void SplashFormTimer_Tick(object sender, EventArgs e)
        {
            // 1. Instantiate the next form
            CalculatorForm calculatorForm = new CalculatorForm();

            // 2. pass a reference to the current form to the next form
            calculatorForm.previousForm = this;

            this.SplashFormTimer.Enabled = false;
            calculatorForm.Show();
            this.Hide();
        }