
怎样让form窗体标题左对齐
2个回答
展开全部
一般情况下,窗口标题栏的文字都是左对齐的,也就是显示在最左边,如果不是,实现方法如下:内置的属性设置代码,可参考下面这个代码片段:
01 private void InitializeComponent()
02 {
03 this.SuspendLayout();
04 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
05 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
06 this.BackgroundImage = global::WindowsTitleleft.Properties.Resources.
背景 2;
07 this.ClientSize = new System.Drawing.Size(248, 144);
08 this.Name = "Form1";
09 this.RightToLeft = System.Windows.Forms.leftToright.Yes;
10 this.Text = "标题栏文字左对齐";
11 this.ResumeLayout(false);
12 }
01 private void InitializeComponent()
02 {
03 this.SuspendLayout();
04 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
05 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
06 this.BackgroundImage = global::WindowsTitleleft.Properties.Resources.
背景 2;
07 this.ClientSize = new System.Drawing.Size(248, 144);
08 this.Name = "Form1";
09 this.RightToLeft = System.Windows.Forms.leftToright.Yes;
10 this.Text = "标题栏文字左对齐";
11 this.ResumeLayout(false);
12 }
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询