Skip to main content

Creating a basic Visual Basic Windows Forms application

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

Information noteThis procedure assumes you have created your basic setup. See: Basic setup of .NET SDK
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.

    A tab in Visual Studio containing an empty form design. "label1" is placed on top of the form design.

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

    Visual Studio with the Properties tab open.

  3. Create a connection to the engine by adding a imports clause for Qlik.Engine in the Form1.vb 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 engine edition from Qlik associative engine and update the label.

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim loc = Qlik.Engine.Location.FromUri(New Uri("ws://127.0.0.1:4848"))
        loc.AsDirectConnectionToPersonalEdition()
        Using hub As IHub = loc.Hub
            Label1.Text = hub.QTProduct
        End Using
    End Sub
    				

    The Form1.vb file containing the above code.

  4. Run the program.

    The Form1 window, containing the words 'Engine 64-bit Edition (x64)'.

You have now created a basic Visual Basic Windows Form application.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!