Windows Forms GUI: Visual Basic

This sample shows how to bind the Windows Forms (WinForms) graphical user interface (GUI) with KINGSTAR .NET API methods. Because this sample centers on the link between the WinForms GUI and the KINGSTAR methods, it demonstrates only the basic features.

Compile and run the sample

The sample file is located at C:\Users\Public\Public Documents\IntervalZero\KINGSTAR SDK\<Version Number>\Samples\GUI\VBDotNet_WINFORM_GUI. Open VBDotNet_WINFORM_GUI.sln and compile it.

NOTE:  File Explorer has two paths: the hierarchy path and full path. The hierarchy path is shown in the address bar. The full path is shown in <File Name> Properties—if you right-click VBDotNet_WINFORM_GUI.sln and click Properties, you'll see the Location is C:\Users\Public\Documents\IntervalZero\KINGSTAR SDK\<Version Number>\Samples\GUI\VBDotNet_WINFORM_GUI, which is the full path. Notice that in the hierarchy path it is Public Documents. If you are using a non-English Windows system, and you want to copy and paste the path to the address bar to find the sample quickly, you must use the full path. If you want to browse to the sample folder through clicks, use the hierarchy path. For English Windows, folder redirection is done automatically. Even if you paste the hierarchy path, File Explorer can lead you to the sample.

The figure below shows the output of the sample:

Source code

The sample is a WinForms application developed using Visual Basic in Visual Studio 2019, and WinForms 64-bit. When developing your own applications, you can choose your own development environment, as long as that the application is 64-bit. The use of 64-bit is required to control the real-time Subsystem.

The main source code is contained in the following files:

Link the .NET API methods to the WinForms GUI

Before you start writing code, you should have built a WinForms GUI. The layout of the GUI can be customized to meet your needs. In this sample, we use only the basic components to demonstrate how to link the .NET API methods to the GUI.

Components

This section introduces the following components: