已经设置好字体,但是程序运行时所有字体统一为小四号字,为什么?

ohone 2010-01-31 06:14:18
如题。
我的窗体内还包括一些容器控件,我感觉应该不是控件的事,主要问题还在form上。但是问题出在哪?
...全文
224 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
kingcsx666 2010-01-31
  • 打赏
  • 举报
回复
是不是基类里面统一设置了字体大小
小在在 2010-01-31
  • 打赏
  • 举报
回复
运行后动态改变一下字体,看看有没有效果
cg2003 2010-01-31
  • 打赏
  • 举报
回复
UP
KnowKjava 2010-01-31
  • 打赏
  • 举报
回复
设置好字体
ohone 2010-01-31
  • 打赏
  • 举报
回复
另外我把form的生成代码贴出来,帮给看看
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1012, 732);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.groupBox2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.KeyPreview = true;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Form1";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.Form1_Load);
this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.Form1_KeyPress);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.tabControl1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.ResumeLayout(false);
ohone 2010-01-31
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 knowkjava 的回复:]
设置好字体
[/Quote]

控件的字体我都是单独设置的。比如label设好的三号字,但是程序运行时就是小四号字
能进一步说说吗?
ohone 2010-01-31
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 kingcsx666 的回复:]
是不是基类里面统一设置了字体大小
[/Quote]

请问这个在哪里查看啊?是在form。designer。cs里面吗?

111,120

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧