Dialog boxes

A dialog box is created by form instruction. The interpreter needs an init message to create the controls and a paint message to show text and pictures.

<form>

<init>

….

</init>

 

<paint>

….

….

</paint>

</form>

The timer tag is called cyclically by the system. All timer controlled instructions have to be programmed within that tag.

The first dialog box shows a caption and a text.

The second dialog box shows a text within the timer message. That text is moved by one pixel after drawing.

For that reason a global variable var_xpos has to be declared and initialized with the value 10. The operation instruction <op> is used to calculate the new position. The var_xpos variable is set to 10 if value 180 has been reached to keep the text visible.

After everything has worked perfectly, a picture is added. The control supports the picture format bitmap and PNG. All pictures have to be stored into the application directory of machine tool builders.

Wordart picture Wordart picture