摘要:
代码设置DataGridView列表头居中:DataGridViewCellStyle style = new DataGridViewCellStyle(); style.Alignment = DataGridViewContentAlignment.MiddleCenter; _datagridview.ColumnHeadersDefaultCellStyle = style;winform 里面让控件获得焦点:1.在窗体的Paint事件 里写 Focus() private void panel1_Paint(object sender, ... 阅读全文