winform在不同电脑分辨率
private void InitializeComponent()
- {
- //设定按字体来缩放控件
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- //设定字体大小为12px
- this.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
- }