DynPicture.Close



Close()
ED
not used
RT
avaliable

Remarks

This event is executed on closing the current picture.

Hint: For the use of events, the "DynPicture" object must be defined with WithEvents.

e.g. Dim WithEvents zPIC As DynPicture

Sample


'Declaration of zPIC, in order to use it with events
Dim WithEvents zPIC As dynpicture

'Event is fired, when project is opened
Private Sub Project_Active()
	'Initialize zPIC with the start picture
	Set zPIC = thisProject.DynPictures.Item("START")
End Sub

'Event is fired, when picture is closed
Private Sub zPIC_Close()
	'Output the time when the picture was closed
	Debug.Print Now & " Picture CLOSED!"
End Sub

'Event is fired, when project is closed
Private Sub Project_Inactive()
	'Deinitialize zPIC on project close
	Set zPIC = Nothing
End Sub


See Also

DynPicture