private void Form_Load (object sender, EventArgs e) { //解决内容重叠塌陷 //BindingFlags.Instance : 对象实例 //BindingFlags.NonPublic : 指可在搜索中包含非公共成员(即私有成员和受保护的成员) System.Type dgvtype = typeof(DataGridView); //声明类型 System.Reflection.PropertyInfo dgvPropertyInfo =
dgvtype.GetProperty("DoubleBuffered", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); dgvPropertyInfo.SetValue(dataGridView_Order, true, null); }