让控件看不出选中

grdList.DefaultCellStyle.SelectionBackColor = grdList.DefaultCellStyle.BackColor;
grdList.DefaultCellStyle.SelectionForeColor = grdList.DefaultCellStyle.ForeColor;

显示完之后不让某一行默认选中

grdList.CurrentCell = null;

C#实现阻止事件的发生

grdList.SelectionChanged -= new EventHandler(grdList_SelectionChanged);

Application.Exit 并不能退出程序时
应该把改程序

        private void FrmOrderDeliver_FormClosing(object sender, FormClosingEventArgs e)
        {
            e.Cancel = true;
            Hide();
           
        }

改成

        private void FrmOrderDeliver_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (e.CloseReason == CloseReason.UserClosing)
            {
                e.Cancel = true;
                this.Hide();
            }     
        }

 

相关文章:

  • 2021-11-12
  • 2022-12-23
  • 2022-02-22
  • 2022-01-22
  • 2022-02-16
猜你喜欢
  • 2022-12-23
  • 2021-11-16
  • 2022-02-05
  • 2022-12-23
  • 2021-09-22
相关资源
相似解决方案