Visio EventSink with Window EventList

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
 
A

ali.iqbal

Selection event have selection object as a subject of the event, a
selection object is a collection, in which primary selected object is
the object which is selected mainly, u can use that object to determine
which shape is selected. I dont have the manual handy otherwise i
wud've told you the exact names of the objects and properties to get
the primary selected object from.

Ali
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top