This topic illustrates how to use C1ColorPicker in Windows Forms applications. The steps to set up Visual Studio project and customize the application during runtime are as follows:
VB |
Copy Code
|
---|---|
Private Sub C1ColorPicker1_ValueChanged(sender As Object, e As EventArgs) Handles C1ColorPicker1.ValueChanged RichTextBox1.SelectionColor = DirectCast(DirectCast(sender, C1ColorPicker).Value, Color) End Sub |
C# |
Copy Code
|
---|---|
private void c1ColorPicker1_ValueChanged(object sender, EventArgs e) { richTextBox1.SelectionColor = (Color)c1ColorPicker1.Value; } |