2012-04-16 12 views

答えて

64

たぶん、このようなものは:

yourformName.YourLabel.Font = new Font("Arial", 24,FontStyle.Bold); 

それとも、フォームと同じクラスであるならば、単純に次の操作を行います。コンストラクタは切り抜いたパラメータを取り

YourLabel.Font = new Font("Arial", 24,FontStyle.Bold); 

(そう選びますあなたの毒)。このように:

Font(Font, FontStyle) 
Font(FontFamily, Single) 
Font(String, Single) 
Font(FontFamily, Single, FontStyle) 
Font(FontFamily, Single, GraphicsUnit) 
Font(String, Single, FontStyle) 
Font(String, Single, GraphicsUnit) 
Font(FontFamily, Single, FontStyle, GraphicsUnit) 
Font(String, Single, FontStyle, GraphicsUnit) 
Font(FontFamily, Single, FontStyle, GraphicsUnit, Byte) 
Font(String, Single, FontStyle, GraphicsUnit, Byte) 
Font(FontFamily, Single, FontStyle, GraphicsUnit, Byte, Boolean) 
Font(String, Single, FontStyle, GraphicsUnit, Byte, Boolean) 

リファレンスhere

5

これは、それを(太字なども)行う必要があります。

label1.Font = new Font("Serif", 24,FontStyle.Bold); 
8

Font Classを使用して、コントロールのフォントとスタイルを設定します。

Font Constructor (String, Single)

Label lab = new Label(); 
lab.Text ="Font Bold at 24"; 
lab.Font = new Font("Arial", 20); 

または

lab.Font = new Font(FontFamily.GenericSansSerif, 
      12.0F, FontStyle.Bold); 

がインストールされているフォントは、この参照してください取得しようと - のみのフォントサイズではないにフォントの名前を変更する .NET System.Drawing.Font - Get Available Sizes and Styles

7

使用して、これを

label1.Font = new System.Drawing.Font(label1.Font.Name, 24F); 
0

varibleを作成してテキストに割り当てることもできます。 2つ以上のテキストを割り当てることができるので、涼しいです。その後、書き込み」 -

はこのvaribleは、任意のテキストyet.Toに割り当てられていない

public partial class Sayfa1 : Form 

    Font Normal = new Font("Segoe UI", 9, FontStyle.Bold); 

    public Sayfa1() 

はそれが(>(名)proportiesを見て)テキストの名前を書くのですかという変数を割り当てるにはフォント変数の名前を呼び出します。

lupusToolStripMenuItem.Font = Normal; 

ここでは、標準フォントに割り当てられたテキストがあります。私が助けてくれることを願っています。

関連する問題