Appendix – Lenze VisiWinNet VisiWinNET Smart Benutzerhandbuch

Seite 253

Advertising
background image

Appendix

Scripts

Basics

6

l

253

SHP−VWNS DE/EN 6.1

Code module assigned to a form

Code modules which are assigned to a form contain functions that are required within a
specific form. The events of the form and of the control elements and components located
on it can be trapped within the code module.

Fig. 6−2

Switching over between the form view (design) and the code view (code)

Structure of scripts

Events are used to call a function. In the code module an event is represented by a frame
function into which the executable code is written. The insertion of a frame function is
supported by the two selection lists in the upper position of the code module.

Fig. 6−3

Example code module

The left selection list contains the names of all objects which can trigger events, i.e. the
names of the form and of the control elements and components on it. After selecting a
name the selection list on the right itemises all events that are supported by the object
selected on the left.

Example: The CommandButton control element selected on the left with the name
"cmdTestifyScript" among other things also provides a "Click" event which is triggered if
the user clicks on the control element with the left mouse button.

Advertising