|
ED
|
not used
|
RT
|
avaliable
|
This event is executed on drawing the current picture. As long
as the picture is open, this event is executed cyclically.
The parameters Left, Top, Bottom and Right define the area to be
updated. For the whole picture this would constitute the definition
of the template. Updating the whole picture is done with
UpdateAll.
Hint: For the use of events, the "DynPicture" object must be
defined with WithEvents.
Private WithEvents m_obDialogPic As DynPicture Private m_obPicDraw As Draw '*** Initialize the project Private Sub Project_Active() '*** get picture DRAW_API for draw-event Set m_obDialogPic = thisProject.DynPictures.Item("DRAW_API") If (m_obDialogPic Is Nothing) Then MsgBox "Error: invalid-picture..." Exit Sub End If Set m_obPicDraw = m_obDialogPic.DrawApi End Sub '*** Drawing with drawapi of the picture Private Sub m_obDialogPic_Draw(ByVal hdc As stdole.OLE_HANDLE, _ ByVal Left As Long, ByVal Top As Long, _ ByVal Bottom As Long, ByVal Right As Long) If (Not m_obPicDraw Is Nothing) Then m_obPicDraw.SetBkColor hdc, vbMagenta m_obPicDraw.FillSolidRect hdc, 200, 200, 200, 200, vbBlue End If End Sub