---
title: "Quick Start in Windows Forms"
canonical: https://www.graphicsmill.com/docs/gm5/QuickStartinWindowsForms.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# Quick Start in Windows Forms
 
This topic describes how to get started with Graphics Mill for .NET when creating the Windows application. We will create a simple Windows Forms application which loads the image and displays it.
 
Follow these steps:
 
1. Create new Windows Forms application in Visual Studio (menu **File** -&gt; **New** -&gt; **Project**).
2. Add the [BitmapViewer](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_BitmapViewer.htm.md) control to the toolbox:
    - Right click the component toolbox and select **Choose Items**.
    - Find the **BitmapViewer** component at the **.NET Framework Components** tab. If for some reason you cannot find this component, click the **Browse** button and find the assembly **Aurigma.GraphicsMill.WinControls.dll**. It should be looking as at this screenshot:
 ![Visual Studio Choose Toolbox Items dialog](https://www.graphicsmill.com/docs/gm5/QuickStartinWindowsForms1.png)
3. Edit the form:
    - Find ![BitmapViewer icon](https://www.graphicsmill.com/docs/gm5/BitmapViewer.gif)BitmapViewer item at the toolbox and drag it at the form.
    - Drag the standard **OpenFileDialog** control at the form.
    - Add a button at the form and add this code at the click event handler: 
 
```
        Private Sub ButtonLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoad.ClickOpenFileDialog1.Filter = Aurigma.GraphicsMill.Codecs.FormatManager.FilterStringForLoad()If OpenFileDialog1.ShowDialog = DialogResult.OK Then	BitmapViewer1.Bitmap.Load(OpenFileDialog1.FileName)End If
        End Sub
        ```
 
```csharp
        private void button1_Click(object sender, System.EventArgs e)
        {openFileDialog1.Filter = Aurigma.GraphicsMill.Codecs.FormatManager.FilterStringForLoad;if (openFileDialog1.ShowDialog() == DialogResult.OK){	bitmapViewer1.Bitmap.Load(openFileDialog1.FileName);}
        }
        ```

    As a result, the form should be looking like this screenshot:
 
    ![Visual Studio Form Designer.](https://www.graphicsmill.com/docs/gm5/QuickStartinWindowsForms2.png)
4. Run the application (menu **Debug -&gt; Start Without Debugging** or **Ctrl+F5** shortcut).

After you run the application and load some image, it will be looking like this screenshot:
 ![Sample application.](https://www.graphicsmill.com/docs/gm5/QuickStartinWindowsForms3.png)
