private void subjectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (ActiveMdiChild != null)
            {
                ActiveMdiChild.Close();
            }
            Frm_Subject objsub = new Frm_Subject();

            objsub.MdiParent = this;
            objsub.Show();
            clearhome();
        }
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 13)
            {
                DataGridViewRow row    = dataGridView1.Rows[e.RowIndex];
                Frm_Subject     objSub = new Frm_Subject();

                //populate the textbox from specific value of the coordinates of column and row.
                Frm_SubView.id        = row.Cells[6].Value.ToString();
                Frm_SubView.code      = row.Cells[1].Value.ToString();
                Frm_SubView.name      = row.Cells[2].Value.ToString();
                Frm_SubView.descript  = row.Cells[8].Value.ToString();
                Frm_SubView.course_Id = row.Cells[7].Value.ToString();
                Frm_SubView.category  = row.Cells[3].Value.ToString();
                Frm_SubView.thmax     = row.Cells[9].Value.ToString();
                Frm_SubView.thmin     = row.Cells[10].Value.ToString();
                Frm_SubView.iamax     = row.Cells[11].Value.ToString();
                Frm_SubView.iamin     = row.Cells[12].Value.ToString();

                Frm_SubView.flag = 1;
                objSub.Show();
            }
        }