# Working with C1FontPicker

This topic illustrates how to use C1FontPicker for Windows Forms applications.

## Content



This topic illustrates how to use [C1FontPicker](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1FontPicker.html) for **Windows Forms** applications. The steps to set up Visual Studio project and customize the application during runtime are as follows:

1.  Create a Windows Forms project and add **C1FontPicker** control to the Form.
2.  Add **RichTextBox** control to the Form. Set the **Text** property of the **RichTextBox** to **TextFontStyle**.
3.  Add the following code to the **C1FontPicker1\_ValueChanged** event handler to change the font of the text on font selection:
    
    ```vbnet
    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
    ```
    
    ```csharp
    private void c1FontPicker1_ValueChanged(object sender, EventArgs e)
    {
        richTextBox1.SelectionFont = new Font(((C1FontPicker)sender).Value.ToString(), richTextBox1.SelectionFont.Size, richTextBox1.SelectionFont.Style);
    }
    ```
    
4.  Run the application. Now you can select the font from **C1FontPicker** drop-down. The following image shows the output:<br />![workingwithfontpicker](https://cdn.mescius.io/document-site-files/images/6c2f30e9-4d3a-4f86-b649-ecbef777b3a3/images/workingwithfontpicker.png)

## See Also

[Applying Visual Styles to C1Font Picker](/componentone/docs/win/online-input/usingthec1inputcontr/c1inputcontrols/C1FontPickerControlOverview/WorkingwithC1FontPicker/ApplyingVisualStylestoC1FontPicker)