[This is preliminary documentation and subject to change.]
The Add method creates an event and adds it to the enhancement stream.
[Set oEvent = ] object.Add( dTime, sName )
The Visual Basic implementation of Add does not return a reference to the newly added event. However, you can retrieve the event from the collection by using the LastAdd, FindTime, or FindHandle properties. Once you have a reference to the object, you can edit its properties or delete it from the collection.
Windows NT: Unsupported.
Windows: Requires Windows 98.
Windows CE: Unsupported.
Header: Declared in stream.idl.
Import Library: Included as a resource in stream.dll.
Unicode: Yes.
The following example creates an EnhEvents collection and adds enhancement events to the collection.
'Declare variables
Dim Ev As IEnhEvents
Dim e As IEnhEvent
'Create the EnhEvents collection
Set Ev = New EnhEvents
'Add two events to the collection
Ev.Add 35, "EventA"
Ev.Add 25, "EventB"
'Add another event to the collection
'and store the event object in e.
Set e = Ev.Add(15, "EventC")