D
Darryl
I am currently trying to set up an event sink class to create handlers for
Shapes Added, Shape Selection Change, and Shapes Deleted and looks something
like the following:
(in clsEventSink.cls)
Private Function IVisEventProc_VisEventProc( _
ByVal nEventCode As Integer, _
ByVal pSourceObj As Object, _
ByVal nEventID As Long, _
ByVal nEventSeqNum As Long, _
ByVal pSubjectObj As Object, _
ByVal vMoreInfo As Variant) As Variant
....
Select Case nEventCode
' SHAPE ADDED...
Case (visEvtAdd + visEvtShape)
' SHAPE CHANGED...
Case (visEvtCodeWinSelChange)
' SHAPE DELETED...
Case (visEvtCodeShapeDelete)
End Select
I have the addadvise for the event handlers setup in the form load of my app.
The problem I am having is with the 'visEvtCodeWinSelChange' event handler.
I can't seem to get the 'pSubjectObj' object so I know which shape I came
from to do some data posting to its shapesheet before moving off the shape.
I'm not sure if there is a shape 'lostfocus' event but this would be usable
as well.
Any help determining which shape I am coming off of from a selection change
would be great.
Darryl Jewett
Shapes Added, Shape Selection Change, and Shapes Deleted and looks something
like the following:
(in clsEventSink.cls)
Private Function IVisEventProc_VisEventProc( _
ByVal nEventCode As Integer, _
ByVal pSourceObj As Object, _
ByVal nEventID As Long, _
ByVal nEventSeqNum As Long, _
ByVal pSubjectObj As Object, _
ByVal vMoreInfo As Variant) As Variant
....
Select Case nEventCode
' SHAPE ADDED...
Case (visEvtAdd + visEvtShape)
' SHAPE CHANGED...
Case (visEvtCodeWinSelChange)
' SHAPE DELETED...
Case (visEvtCodeShapeDelete)
End Select
I have the addadvise for the event handlers setup in the form load of my app.
The problem I am having is with the 'visEvtCodeWinSelChange' event handler.
I can't seem to get the 'pSubjectObj' object so I know which shape I came
from to do some data posting to its shapesheet before moving off the shape.
I'm not sure if there is a shape 'lostfocus' event but this would be usable
as well.
Any help determining which shape I am coming off of from a selection change
would be great.
Darryl Jewett