Creating the Setting Window User Interface (UI)

Create an execution file for the interface to set the parameters required to perform internal processing.

Adding a Control

Add the controls required for the form according to the following procedure:
  1. In Solution Explorer, right-click the form to be edited and select [Display designer].
    The form opens. When "Simplified non-stop adjustment" is checked in the FJ processing item creation wizard, the model project includes NormalForm.vb and NonstopForm.vb.
    • NormalForm.vb
      This is a standard Setting window. This is the form for setting the parameters required for measurement.
    • NonstopForm.vb
      This is a simplified Setting window that opens during continuous measurement. This is the form for setting editable parameters such as judgement conditions during measurement.
    In the sample program, edit NormalForm.vb.
  2. Select the required control from the toolbox, and arrange it on the form.
    The following controls are arranged in the NormalForm.vb form, which is included in the model project:
    Form window
    In the sample program, arrange the following controls in NormalForm.vb, which is included in the model project:
    [Model setting] tab
    Model setting tab
    [Measurement] tab
    Measurement tab

Setting Control Properties

Set the properties for the added controls.
In the sample program, "FigureSetControl", "ValueSetControl", "TabControl", and "GroupPanel" are set.
  1. Right-click the controls in the form and select [Property].
    The Property Edit window opens.
  2. Set the following items for "FigureSetControl".
    FigureSetControl
    FigureSetControl
    FigureSetControl properties
    FigureSetControl Properties
    Table: FigureSetControl properties
    Item
    Description
    DataIdentNum_Figure
    Set the number according to the figure number in the processing item MS. Specify "0" here because the figure number 0 is defined for model registration in the processing item MS.
    refCreating Internal Processing (MS)
    DataType
    Specify "UnitData".
    ImageWindow
    Associate this item with the control of the Image Display window. In the sample program, specify "imgMain", which is the class name of SetupImageWindow which is included in the model form.
  3. Set the following items for "ValueSetControl".
    ValueSetControl
    ValueSetControl
    ValueSetControl properties
    ValueSetControl Properties
    Table: ValueSetControl properties
    Item
    Description
    DataIdent
    Associate this item with the data name in SetUnitData.cpp of the processing item MS. In the sample program, specify "candidateLevel" as defined in SetUnitData.cpp.
    refCreating Internal Processing (MS)
    DataType
    Specify "UnitData".
  4. Set the following item for "GroupPanel".
    GroupPanel
    GroupPanel
    GroupPanel property
    GroupPanel Properties
    Table: GroupPanel property
    Item
    Description
    TitleText
    Specify the title name for GroupPanel. In the sample program, "Measurement condition" is specified.
  5. Set the following item for "TabControl".
    TabControl
    TabControl
    TabControl property
    TabControl Property
    Table: TabControl property
    Item
    Description
    TabPages
    Specify this item to increase the number of tabs or to change the tab name.
    In the sample program, one more tab is added. The tabs are named as follows:
    • tabMenu1: Text Model
    • tabMenu2: Text Region setting
    • tabMenu3: Text Measurement

Initialization

In the "Form_Load" event of the FZ-Main form, write the initialization process of the controls added to the form.
The initialization of the processing item mainly performs the following two kinds of process:
Use the UnitDataN/UnitDataS() API to get the settings data. The data name set for the argument is the one that is specified in the MS external interface (UnitData.cpp).
When custom controls are used, data getting, data setting, and data range checks can be automatically performed by associating the data names with those set in the MS item in the custom control properties setting. In that case, the process above (such as getting the settings data) is unnecessary.
Since custom controls are used in the sample program, the process of getting the data is not written. Settings relating to image display and tab control are performed.

Writing the Code for Added Components

For a control added to the form, write the process to be executed upon occurrence of the event. In the sample program, the process to be executed when switching tabs is written.
Sample Program
Sample program display example
(1)
When switching tabs, the control is copied to the new tab.
For a control common to the form, such as [OK], prepare only one control on the form and move it when switching tabs to reduce the number of controls on the form.
(2)
For the [Model] tab and the [Region setting] tab, the same control is used in different property settings respectively. In that case, copy the control and change property settings.

Building a Program

Execute [Build] - [Build solution] from the menu, and an execution file is created. If an error occurs during building, correct the error.