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

| VB |
コードのコピー
|
|---|---|
Private Sub C1ColorPicker1_ValueChanged(sender As Object, e As EventArgs) Handles C1ColorPicker1.ValueChanged RichTextBox1.SelectionColor = DirectCast(DirectCast(sender, C1ColorPicker).Value, Color) End Sub |
|
| C# |
コードのコピー
|
|---|---|
private void c1ColorPicker1_ValueChanged(object sender, EventArgs e) { richTextBox1.SelectionColor = (Color)c1ColorPicker1.Value; } |
|