EnhEvents.Add

[This is preliminary documentation and subject to change.]

The Add method creates an event and adds it to the enhancement stream.

Syntax

[Set oEvent = ] object.Add( dTime, sName )
 

Parts

object
Object expression that resolves to an EnhEvents object.
dTime
Double that contains the start time of the event, in seconds. This value is used to initialize the EnhEvent.Start property of the new object.
sName
String that contains the event name. This value is used to initialize the EnhEvent.Name property of the new event.
oEvent
EnhEvent object that was added to the EnhEvents collection.

Remarks

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.

QuickInfo

  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.

See Also

EnhEvents.AddText

Examples

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")