Close Form Popup before opening MessageBox.Show and the form use delegate ?


Author
Message
Dong Trien Lam
Dong Trien Lam
StrataFrame Novice (105 reputation)StrataFrame Novice (105 reputation)StrataFrame Novice (105 reputation)StrataFrame Novice (105 reputation)StrataFrame Novice (105 reputation)StrataFrame Novice (105 reputation)StrataFrame Novice (105 reputation)StrataFrame Novice (105 reputation)StrataFrame Novice (105 reputation)
Group: Anonymous / Guest
Posts: 57, Visits: 251

Suppose you have two forms: frmMain and frmPopup, on frmMain has 1 button (the button) click open frmPopup, on frmPopup many (button), you click on the button any frmPopup button will transmit data by the delegate of copper frmMain frmPopup before closing time announced new open yes / no of MessageBox.Show. When your done click the close button again poup frmPopup then MessageBox.Show on frmPopup, frmPopup refused to play, until the click buttons yes/no of MessageBox.Show, click the button here as yes / no, then frmPopup and MessageBox. Show it to close. I want to play a new fat frmPopup MessageBox.Show done. Their code has the following structure:


//Declare frmMain

public partial class frmMain : Form

    {

        // Declare delegate transmissions data  ...

        private void getData(data)

        { 

            //...

            if (conditions) Updata();

        }

        public frmMain()

        {            

            InitializeComponent();

        }

        private void cmdfrmPopup_Click(object sender, EventArgs e)

        {

             frmPopup frm = new frmPopup(data);  

             frm.Data = getData;

             frm.ShowDialog();

        }

        private void Updata()

        {

             DialogResult dlgRes; 

             string sAskUser = "Are you sure delete ?" ...

             dlgRes = MessageBox.Show(sAskUser, "warning..", MessageBoxButtons.YesNo, Question);

             if (dlgRes == DialogResult.OK)

            {

                // do somthing

            }

        }

    }

    

 //Khai báo frmPoup

public partial class frmPopup : Form

    {

        // Declare delegate transmissions data ...

        public frmPopup(nhandulieuden)

        {

            InitializeComponent();

            //...            

        }


        private void cmdButton1_Click(object sender, EventArgs e)

        {

            Process();

        }

        

        private void cmdButton2_Click(object sender, EventArgs e)

        {

            Process();  

        }

        

        private void cmdButton3_Click(object sender, EventArgs e)

        {

            Process();

        }

        

        private void cmdButton4_Click(object sender, EventArgs e)

        {

            Process();

        }

        private void Xuly()

        {

            // to do somthing..

            

            // This Brushes their 2 statements for each island has been the case presented above

            this.Close();

            transmissionOffrmMain(data);           

        }

        private void cmdExit_Click(object sender, EventArgs e)

        {

             this.Close();

        }

        

    }

}    


through available tracks your household help this place.


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search