Microsoft DirectX 8.1 (Visual Basic)

DirectX8.CreateEvent

Creates a handle for the form's event object.

object.CreateEvent( _
    event As DirectXEvent8 _
) As Long

Parts

object
Object expression that resolves to a DirectX8 object.
event
The form's DirectXEvent8 object.

Return Values

Returns a Long value set to the form's event handle.

Error Codes

If the method fails, an error is raised and Err.Number is set.

Remarks

A DirectXEvent object must be implemented by a form in order to receive notifications from Microsoft® DirectX®. This method creates an event handle for this object that is used by the notification methods of Microsoft DirectSound®, DirectMusic®, DirectPlay®, and DirectInput®.

DirectX automatically sets the event object to be signaled when an appropriate event occurs. You can also set the event manually by calling the DirectX8.SetEvent method. This procedure is normally used to test the event-handling code.

Applications must explicitly destroy all the events they create by calling the DirectX8.DestroyEvent method. Failure to do so will cause unpredictable results.