You can set the font on the header cell like:
dataGridView.Columns[0].HeaderCell.Style.Font = new Font(... etc
Or for all columns:
dataGridView.ColumnHeadersDefaultCellStyle.Font = new Font(... etc
但是,如果可以的话,我建议由设计人员执行此操作(如果在designer.cs中具有样式等,效果会更好)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.