We now want to replace the info window with a standalone, individually designed window.
To do this, a form must be created in the class editor, which is the template for our window.
To do this, create a form named MainForm.
Now we can open the form editor by right clicking the entry or by clicking the symbol
You can now resize the form. But what content can you create in the form? Currently, no controls are available.
Therefore, switch to the properties of the knowledge base and select the entry Typelibs in the right pane. From there, you switch to the TCE type libraries and select the following type libraries. Be sure to lock the knowledge base before you try to select them.
The Typelib switch column controls the availability of the library at the server, and the Client switch column controls the availability of the library at the client. The Control switch column indicates that the selected type library is a library of elements for the graphical user interface.
You have now selected buttons and input elements. After this selection, the type libraries are available in the form editor.
Now you can create a button on the form. Select the button icon and drag the button onto the form surface. Alternatively, you can span a range by mouse.
That is what the result might be.
The button now has no text. Double-click the button and in the lower part of the editor you will get the properties of the button. If the properties are not visible, check the form editor toolbar.
Now enter the text of the button in the initial value of the text line.
The Text property has the Expression field in addition to the Initial Value field. Alternatively, setting the text of the button might look like this:
The advantage of typing as an expression is that the property can dynamically adjust. For example, the text of the button could be based on the current dialog language by entering a multilingual text constant here.
When the user clicks the button, an action should be performed. The possible actions, also called events, are available in the Register Events. For buttons, the default action, the click on the button is already created.
Events appear in the form's tree below the control.
Now enter the following in the Click event:
Now you have to get the form to appear when you start the application.
To do this, enter the following program code in the ClassInitialize function:
Function ClassInitialize() As Void
MainForm.Show
End Function
Start debugging.
A window with the form opens and after clicking on the button the information window "Hello World" appears.
(knowledge base Tutorial Stage 2)