# Create Your First Windows Forms Application

> Create a .NET Windows Forms app with TextControl, a ribbon and TXSpellChecker from NuGet, connect SpellChecker and underline misspelled words as you type.

- **Product:** TX Spell .NET for Windows Forms
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Spell .NET for Windows Forms > Getting Started > TX Text Control > Create Your First Windows Forms Application
- **1867 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/getting-started/tx-text-control/first-application/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/getting-started/tx-text-control/first-application/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/getting-started/tx-text-control/first-application/llms-full.txt

---

A word processor with spell checking takes two packages and a few clicks in the designer. You create a Windows Forms application for .NET, add TX Text Control with a ribbon, drop the `TXSpellChecker` of TX Spell .NET on the form and connect the two. Without a line of code, misspelled words are then underlined as you type, corrected from the context menu, and words are hyphenated at the end of a line.

### Prerequisites

- Visual Studio on Windows with .NET 8 or higher.
- The setups of TX Spell .NET for Windows Forms 11.0 and TX Text Control .NET for Windows Forms 34.0, the full or the trial versions, installed on your machine. They provide the package source **Text Control Offline Packages** and the designers. See [Installing the Product](https://docs.textcontrol.com/tx-spell-dotnet-winforms/installation/setup/llms-full.txt).

### Create the Project

1. Open Visual Studio and create a new project.
2. Select **C#** from the **Languages** list, **Windows** from the **Platform** list and **Desktop** as the **Project Type**.
3. Select the project template **Windows Forms App** and click **Next**.

    ![The Create a new project dialog of Visual Studio with the template Windows Forms App selected.](https://docs.textcontrol.com/assets/img/tx-spell-dotnet-winforms/vs-new-project-winforms.27d76a74.webp)
4. Enter a project name and click **Next**.
5. Select .NET 8 or higher as the **Framework**, for example .NET 8 (Long Term Support), and click **Create**.

The template **Windows Forms App (.NET Framework)** creates a .NET Framework project instead, which [Create a .NET Framework Application](https://docs.textcontrol.com/tx-spell-dotnet-winforms/getting-started/tx-text-control/dotnet-framework/llms-full.txt) covers.

### Install the NuGet Packages

1. Select the project in **Solution Explorer** and choose **Project** > **Manage NuGet Packages...**.
2. Select **Text Control Offline Packages** in the **Package source** list and click **Browse**.
3. Select `TXTextControl.TextControl.WinForms.SDK` and click **Install**.
4. Select `TXTextControl.TXSpell.WinForms.SDK` and click **Install**.

    ![The NuGet Package Manager of Visual Studio with the package source Text Control Offline Packages and the search term TXSpell, listing TXTextControl.TXSpell.Core.SDK and TXTextControl.TXSpell.WinForms.SDK, here in version 11.0.0, with the details of the Core package.](https://docs.textcontrol.com/assets/img/tx-spell-dotnet-winforms/nuget-offline-txspell.ac27c880.webp)

| Package | Adds |
|---|---|
| `TXTextControl.TextControl.WinForms.SDK` | The `TextControl` editor, its ribbon and bars, and the license of TX Text Control |
| `TXTextControl.TXSpell.WinForms.SDK` | The [TXSpellChecker](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/llms-full.txt) component, its dialogs, the license of TX Spell .NET, and the US English dictionary, hyphenation list, thesaurus and language recognition data, which it copies into the output folder when you build |

[Package Overview](https://docs.textcontrol.com/tx-spell-dotnet-winforms/installation/nuget/packages/llms-full.txt) describes the packages of TX Spell .NET.

### Add the Editor to the Form

1. Open **Form1** in the designer from **Solution Explorer**.
2. In the **Toolbox**, open the tab **TX Text Control 34.0**, select **TextControl** and draw the control onto the form.
3. Click the smart tag in the upper right corner of the `TextControl`. In the **Wizards** group, click **Add a Ribbon**, **Add a Status Bar**, **Add a Ruler** and **Add a Vertical Ruler**.

    ![The TextControl Tasks smart tag of a TextControl on a form, with the Appearance section, the Information section with the version, here 31.0, and the Wizards section with links such as Add a Ribbon, Add a StatusBar, Add a Ruler, Add a Vertical Ruler and Arrange Controls Automatically.](https://docs.textcontrol.com/assets/img/tx-spell-dotnet-winforms/textcontrol-smart-tag-tasks.e4881f3e.webp)
4. Click **Arrange Controls Automatically**. The controls are now connected to the `TextControl` and docked so that they fill the form.
5. Select the ribbon by clicking its blue **File** tab title, and click the smart tag in the upper right corner of the ribbon.
6. Click **Add a RibbonFormattingTab**, **Add a RibbonInsertTab**, **Add a RibbonPageLayoutTab**, **Add a RibbonViewTab** and **Add a RibbonProofingTab**.

    ![The Ribbon Tasks smart tag of the ribbon with the links Add a RibbonFormattingTab, Add a RibbonInsertTab, Add a RibbonPageLayoutTab, Add a RibbonViewTab and Add a RibbonProofingTab, and the Proofing tab already added.](https://docs.textcontrol.com/assets/img/tx-spell-dotnet-winforms/ribbon-smart-tag-add-tabs.394d6c62.webp)

The **Proofing** tab holds the commands of TX Spell .NET. The TX Text Control tutorial [Create Your First Windows Forms Application](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/getting-started/document-editor/first-application/llms-full.txt) describes the editor and its ribbon in more detail.

### Add the Spell Checker

1. In the **Toolbox**, open the tab **TXSpell 11.0** and drag **TXSpellChecker** onto the form.
2. The component has no user interface: it appears as *txSpellChecker1* in the component tray below the form.

    ![The component tray below the form with txSpellChecker1.](https://docs.textcontrol.com/assets/img/tx-spell-dotnet-winforms/component-tray-spellchecker.0e62542b.webp)

### Connect the Spell Checker

1. Select the `TextControl` on the form.
2. In the **Properties** window, open the drop-down list of **SpellChecker** and select **txSpellChecker1**.

    ![The Properties window of textControl1 with the SpellChecker drop-down open and txSpellChecker1 selected.](https://docs.textcontrol.com/assets/img/tx-spell-dotnet-winforms/properties-spellchecker.9fdad44f.webp)
3. Set **IsSpellCheckingEnabled** to **True**, to check spelling as the user types.
4. Set **IsHyphenationEnabled** to **True**, to hyphenate words at the end of a line.
5. Set **IsLanguageDetectionEnabled** to **True**, to detect the language of the text.

The application needs no code of your own: the designer writes these settings into *Form1.Designer.cs*. The settings work as follows:

- [SpellChecker](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/spellchecker-property/llms-full.txt) connects the editor to the spell checker. The spell checker is initialized by this connection.
- [IsSpellCheckingEnabled](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/isspellcheckingenabled-property/llms-full.txt) underlines misspelled words.
- [IsHyphenationEnabled](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/ishyphenationenabled-property/llms-full.txt) and [IsLanguageDetectionEnabled](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/islanguagedetectionenabled-property/llms-full.txt) use the hyphenation lists and the language recognition data of the spell checker.

### Run the Application

Press **F5** and type a sentence with a spelling mistake:

- Each misspelled word gets a red zigzag line once it is complete. English is checked out of the box, with the dictionary the package copied into the output folder.
- A right-click on a misspelled word opens the spell check context menu with suggestions, which also opens the spell check dialog.
- When a line is full, its last word is hyphenated with the English hyphenation list.
- The **Proofing** tab turns spell checking and hyphenation on and off, and offers commands to correct misspelled words, show synonyms, set and detect languages, and change the settings of spell checking, hyphenation and the thesaurus.

![The Proofing tab of the ribbon with the buttons Enable Spell Checking, Enable Hyphenations, Thesaurus, Spelling, Load Dictionary, Load Thesaurus File and Manage Spelling & Hyphenation.](https://docs.textcontrol.com/assets/img/tx-spell-dotnet-winforms/ribbon-proofing-tab.748b5cc8.webp)

### Troubleshooting

- **The tab TXSpell 11.0 is missing.** The tab comes from `TXTextControl.TXSpell.WinForms.SDK`, not from `TXTextControl.TXSpell.Core.SDK`. See [Toolbox and Designer](https://docs.textcontrol.com/tx-spell-dotnet-winforms/troubleshooting/toolbox/llms-full.txt).
- **No words are underlined.** Check the three properties of the last step. See [Spell Checking Doesn't Start](https://docs.textcontrol.com/tx-spell-dotnet-winforms/troubleshooting/toolbox/#spell-checking-doesn-t-start).
- **Text Control Offline Packages is not in the Package source list.** See [Configuring Package Sources](https://docs.textcontrol.com/tx-spell-dotnet-winforms/installation/nuget/sources/llms-full.txt).

### Next Steps

- [Correct Words from the Context Menu](https://docs.textcontrol.com/tx-spell-dotnet-winforms/getting-started/tx-text-control/context-menu/llms-full.txt): try the commands of the menu.
- [Open the Spell Check Dialog](https://docs.textcontrol.com/tx-spell-dotnet-winforms/getting-started/tx-text-control/dialog/llms-full.txt): correct the whole document in one pass.
- [As-You-Type Checking](https://docs.textcontrol.com/tx-spell-dotnet-winforms/spell-checking/as-you-type/llms-full.txt): the properties behind the underlines, and connecting in code.
- [Dictionaries and Languages](https://docs.textcontrol.com/tx-spell-dotnet-winforms/dictionaries/llms-full.txt): check languages other than English.

---

## Nearby

- **Previous:** [TX Text Control](https://docs.textcontrol.com/tx-spell-dotnet-winforms/getting-started/tx-text-control/llms-full.txt)
- **Next:** [Create a .NET Framework Application](https://docs.textcontrol.com/tx-spell-dotnet-winforms/getting-started/tx-text-control/dotnet-framework/llms-full.txt)
