2
Answers

inserting a passwork to a form on c#

Ask a question
gemma browse

gemma browse

13y
7.1k
1
private void button6_Click(object sender, EventArgs e){
            {
             public partial class frmPassword : Form
            {   
             public frmPassword()
            {
                InitializeComponent();
            }
            public bool LoginOk { get; private set; }
    
            private void btnEnter_Click(object sender, EventArgs e)
            {
            LoginOk = txtpas.Text == "password";           
            string pas = "password";
            this.visible = false;
            int count = 0;         
            if (btnEnter.Enabled && count < 3)
            {


            if (this.txtpas.Text != pas)
            {
            count++;
            MessageBox.Show("You have entered the wrong password" +
            "/n you only have " + count + "tries left!");
            }

            else if (this.txtpas.Text == pas)
            {
            PickLarger formpicklarger = new PickLarger();
            formpicklarger.Show();
                   }
               }
            }


theres something wrong with the bracket on the 2nd line anyideas why it is } expected?

Answers (2)