DynPicture

 

Remarks Properties Methods Events DynProperties Samples

ED
avaliable
RT
avaliable

Remarks:Top

This collection contains the defined pictures. The single pictures can contain different dynamic elements. Each picture is linked to a template, that contains general information on the outer appearance.
Pictures always come from the current project

Properties:Top

AutoKBLayout BackColor BackgroundImage
BackgroundImageStyle BorderStyle Bottom
Enable EndFunction Height
Hide Left Name
Online Parent PictureFilter
Right ShowInCE ShowModal
ShowTitle StartFunction Template
Top Type UseTemplateSize
Width    

Methods:Top

Activate CheckIn CheckOut
Copy CreateMdiDefaultElements DeselectElements
DrawApi DynPropertiesEnum[GET] DynProperties[GET]
DynProperties[PUT] Elements Get
Hardcopy InsertSymbol IsCheckedOut
IsDifferent IsLocked MdiElements
Move Save SelElements
UndoCheckOut Update UpdateAll

Events:Top

Close Draw Open
Timer    

DynProperties:Top

Name Type Description
AutoKBLayout Boolean

Automatic keyboard layout

You cannot enter alternative button labels for the buttons of a picture of the type Keyboard. The original labels of the keyboard layout of the operating system will be used.

More in the online help

BackgroundColor ZT_COLOR

Background color

Background color of the picture.
Default: color from the template.

Read more in the online manual

BackgroundPic ZT_FILE

Graphics file

Selection of the background picture.
The formats *.jpg, *.gif, *.bmp are supported.

ATTENTION: Only pictures added to the project under "Files/Graphics" are available.

Read more in the online manual

BackgroundPicStyle Long

Alignment

Only available, after a picture has been selected:
Display type of the background picture:
normal: original bitmap size in the top left corner.
centered: original bitmap size in the center.
stretched: bitmap size streched to the size of the picture.
tiled: original bitmap size in tiles.

Read more in the online manual

BorderStyle Long

Border style

Only available, if a frame is selected in the definition of the template:
Border style of the picture.
Bold frame: Display a bold frame around the picture. The size of the picture can be chnaged in the Runtime.
No frame: No frame is displayed.
Thin frame: Display a thin frame around the picture.

Read more in the online manual

EndFunction ZT_FUNCTION

End function

Function, that should be executed automatically when closing the picture in the Runtime.
Opens the function selection dialog.
If more than one function should be executed here, a script with all the desired functions has to be created and the function for executing the script is linked here.

ATTENTION: Opening another picture of the same template automatically closes this picture and thus also executes the linked function.

Read more in the online manual

EndFunctionID Long With this property you have the opportunity to get/set the "end function" of a picture via the unique function ID.
Height Long

Height [pixels]

Only available, if the size of the picture is not taken from the template:
The height of the picture (in pixels).

Read more in the online manual

Modal Boolean

Modal dialog

Active: As long as this picture is open in the Runtime, no other picture beside it can be operated (e.g. for a login picture). Other pictures that were opened out of this picture can be operated.
Inactive: Other pictures can be operated as usual.
Default: inactive.

Read more in the online manual

PicActivVar ZT_VARIABLE_DYN

Picture active variable

The bit variable linked here is set to 1, when the picture is opened; it is set back to 0, when the picture is closed.
Opens the variable selection dialog filtered on bit variables.

ATTENTION: Opening another picture of the same template automatically closes this picture and thus executes the linked function.

Example: The background colors of buttons in a button bar should indicate, which picture is open at the moment. The bit variables linked to the single pictures all have the limit color green for the value 1 and the limit color white for the value 0. These bit variables are linked to the dynamic background colors of the according buttons. So the button opening the currently open picture always has the background color green and all others are white.

Read more in the online manual

ShowInCE Boolean

Visible under CE

Active: The picture is also displayed under Windows CE.
Inactive: The picture is not displayed under Windows CE.
Default: active.

Thus in networks with PCs and CE devices functionalities not supported by Windows CE can be used on the PCs without having problems on the CE devices.

Read more in the online manual

ShowTitle Boolean

Display title

Only available, if a frame is selected for the picture:
Active: Display a Windows title bar for this picture. The picture can be moved in the Runtime.
Inactive: Display no title bar.

Read more in the online manual

SizeFromTemplate Boolean

Size from template

Active: The size and the position of the picture is defined by the linked template.
Inactive: Width and height of the picture can be freely defined. The position of the top left corner is still defined by the template.
Default: active.

Read more in the online manual

StartFunction ZT_FUNCTION

Start function

Function, that should be executed automatically when opening the picture in the Runtime.
Opens the function selection dialog.
If more than one function should be executed here, a script with all the desired functions has to be created and the function for executing the script is linked here.

Read more in the online manual

StartFunctionID Long With this property you have the opportunity to get/set the "end function" of a picture via the unique function ID.
Template String

Template

Changes to the assigned template without converting the picture elements to the new picture size (stretching or shrinking).

Read more in the online manual

Title String

Name

Unique name of the picture.
Default: Picture x (where x is a consecutive number).

Read more in the online manual

Type Long

Picture type

Standard: picture type for creating process pictures. All vector and dynamic elements can be used.
Special picture types: pictures that are not of the picture type "Standard" only have to be created once and can then be opened with different data via special filter settings of the Picture switch function. After selecting a special picture type, the control elements associated with the picture type become available in the menu.

Default: Standard

attention Attention

As soon as you change the picture type from standard to a special picture type, it will be fixed and you will not be able to change it later. The only way to change the picture type later on is to delete the picture and create a new one.

More in the online help

Width Long

Width [pixels]

Only available, if the size of the picture is not taken from the template:
The width of the picture (in pixels).

Read more in the online manual

Samples:Top

'##############################################
'## VBA Code in the Module "ModuleElement"   ##
'## ---------------------------------------- ##
'## LeftClickUp - Event has to be created in ##
'## the Editor with the Name "PopUp"...	##
'## (Scripting - VBA Makros - ModuleElement) ##
'##############################################

'event for clicking on a element
Public Sub LeftClickUp_PopUp(obElem As Element)
	'save the position information of the element to public
	'member variables in the thisProject Classmodule...
	thisProject.lLeft = obElem.Left
	thisProject.lTop = obElem.Top
	'execute different functions depending to the element name...
	'Example for FuntionName: POPUP_Valve001
	'>> Valve001 ist the Objectname of the Element!
	thisProject.RtFunctions.Item("POPUP_" & obElem.Name).Start
End Sub


'###############################################
'## VBA Code in the ClassModule "thisProject" ##
'## ----------------------------------------- ##
'## When the POPUP Picture opens, the Open -  ##
'## Event is executed and the new positions   ##
'## will be set with the Move - Method		##
'###############################################

'declaration of the position members...
Public lLeft As Long
Public lTop As Long
'declaring the DynPicture Object for the OPEN event...
Dim WithEvents dynPicPOPUP As DynPicture

'on project startup...
Private Sub Project_Active()
	'setting the Dynpicture object to the "POPUP" Picture...
	Set dynPicPOPUP = thisProject.DynPictures.Item("POPUP")
	'check if there was a problem an initializing the DynPicture Object...
	If dynPicPOPUP Is Nothing Then
		MsgBox "moving the picture is not possible..."
	End If
End Sub

'when the picture opens...
Private Sub dynPicPOPUP_Open()
	'moving the picture...
	dynPicPOPUP.Move lLeft, lTop, dynPicPOPUP.Width, dynPicPOPUP.Height
End Sub

'on project exit...
Private Sub Project_Inactive()
	If dynPicPOPUP Is Nothing Then Exit Sub
	'release the object...
	Set dynPicPOPUP = Nothing
End Sub