このトピックでは、Windows フォームアプリケーションで C1FontPicker を使用する方法について具体的に説明します。Visual Studio プロジェクトを設定し、実行時にアプリケーションをカスタマイズする手順を示します。

| VB |
コードのコピー
|
|---|---|
Private Sub C1FontPicker1_ValueChanged(sender As Object, e As EventArgs) Handles C1FontPicker1.ValueChanged RichTextBox1.SelectionFont = New Font(DirectCast(sender, C1FontPicker).Value.ToString(), RichTextBox1.SelectionFont.Size, RichTextBox1.SelectionFont.Style) End Sub |
|
| C# |
コードのコピー
|
|---|---|
private void c1FontPicker1_ValueChanged(object sender, EventArgs e) { richTextBox1.SelectionFont = new Font(((C1FontPicker)sender).Value.ToString(), richTextBox1.SelectionFont.Size, richTextBox1.SelectionFont.Style); } |
|