Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Form1.inputString = textBox1.Text;


            Form f = this.FindForm();

            f.Controls.Remove(this);

            SecondScreen ss = new SecondScreen();

            f.Controls.Add(ss);
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //Form1.inputString = textBox1.Text;
            string userName = textBox1.Text;
            string PassWord = textBox2.Text;

            // textBox2.Text;

            if (Form1.name == userName && Form1.pass == PassWord)
            {
                Form f = this.FindForm();
                f.Controls.Remove(this);
                SecondScreen ss = new SecondScreen();
                f.Controls.Add(ss);
            }
            else //if (userName)
            {
                label3.ForeColor = Color.Black;
                // System.Threading.Thread.Sleep(1000);
                // label3.ForeColor = Color.Gray;
            }
        }