Jump to content

Formlar Arası Bool Değer


muratboy31
 Share

Recommended Posts

Merhaba arkadaşlar,

 

3 adet form var projede, istediğim form 3 te butana tıklandığında form 1 deki değer true olsun ama bir türlü olmuyor nedense !

 

 Form 3 :

        private void buttonX1_Click(object sender, EventArgs e)
        {
            Form1 Main = new Form1();
            Main.LoginCheck = true;
        }

Form 1 :

        public bool LoginCheck { get; set; }
        

        private void metroShell1_SettingsButtonClick(object sender, EventArgs e)
        {   
            if (LoginCheck == true)
            {
                Form4 Panel = new Form4();
                Point location = new Point(this.Location.X - (this.Width - 20), this.Location.Y + this.Height / 2 - eMail.Height);
                Panel.Location = location;
                Panel.Show();             
            }
            else
            {
                Form3 Login = new Form3();
                Point location = new Point(this.Location.X - (this.Width - 20), this.Location.Y + this.Height / 2 - eMail.Height);
                Login.Location = location;
                Login.ShowDialog();
            }
        }


        private void Form1_Load(object sender, EventArgs e)
        {
            LoginCheck = false;
        }
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...