# Creating a basic C# Windows Forms application

This topic describes how to create a basic C# Windows Forms application in Visual Studio.

Information noteThis procedure assumes you have created your basic setup. See: [Basic setup of .NET SDK](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPI/Content/Sense_NetSDKAPI/GettingStarted/Basic-SetUp.htm)

Information noteThis procedure assumes that you are using Qlik Sense Desktop and that it is running when you test your application.

Do the following:

1. Create a label (label1) to display the version of the Qlik associative engine.

   [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPI/Content/Sense_NetSDKAPI/GettingStarted/Net-Sdk-Csharp-HelloWorld.htm)

   #### Steps

   1. Select Solution Explorer &gt; Form1.cs &gt; View Designer to open the Form1.cs [Design] page.
   2. Create a label Toolbox &gt; Common controls &gt; Label
   3. Place the label on the Form1 component.

   ![A tab in Visual Studio containing an empty form design. "label1" is placed on top of the form design.](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPI/Content/Resources/Images/GetStarted/ex_CsGetStarted-03.png)

2. Create an event handler for the load event of the form.

   [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPI/Content/Sense_NetSDKAPI/GettingStarted/Net-Sdk-Csharp-HelloWorld.htm)

   #### Steps

   1. Open the Properties panel for the Form1 object and click on the Events button.
   2. Double click on Load to add an event. The event (Form1\_Load) is added and the code page is displayed.

   ![Visual Studio with the Properties tab open.](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPI/Content/Resources/Images/GetStarted/ex_CsGetStarted-04.png)

3. Create a connection to the engine by adding a `using` clause for Qlik.Engine in the Form1.cs file.

   Information noteThis example assumes that the engine is running locally because the hub is retrieved from Qlik.Engine.Location.FromUri.

   Then call QTProduct() as a synchronous call to retrieve the version number from Qlik associative engine and update the label.

   ```
   private void Form1_Load(object sender, EventArgs e)
   {
       ILocation location = Qlik.Engine.Location.FromUri(new Uri("ws://127.0.0.1:4848"));
       location.AsDirectConnectionToPersonalEdition();
       using (IHub hub = location.Hub())
       {
           label1.Text = hub.QTProduct();
       }
   }
   				
   ```

   ![The Form1.cs file containing the above code.](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPI/Content/Resources/Images/ex_CsGetStarted-05.png)

4. Run the program.

   [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPI/Content/Sense_NetSDKAPI/GettingStarted/Net-Sdk-Csharp-HelloWorld.htm)

   #### Steps

   1. Select Debug &gt; Start Debugging.
   2. Ensure there is a compatible Qlik associative engine running. The version number of the engine is displayed.

   ![The Form1 window, containing the words 'Engine 64-bit Edition (x64)'.](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPI/Content/Resources/Images/ex_CsGetStarted-06.png)

You have now created a basic C# Windows Form application.