Microsoft DirectX 8.1 (Visual Basic)

Creating DirectX Objects

Every Microsoft® DirectX® for Microsoft Visual Basic® application must have a DirectX8 object. This is the parent object whose methods are used to create the principal objects for each DirectX component. The DirectX8 object has many other methods, such as methods to perform calculations for Microsoft Direct3D®.

To create a DirectX8 object, declare it as a new object. For example:

Public gObjDX As New DirectX8

Many of the primary DirectX component objects, such as DirectSound8 are not created directly. Instead, you must create those objects by calling the appropriate DirectX8 method. For example, to create a DirectSound8 object, create a variable and assign it the return value of DirectX8.DirectSoundCreate.

Public gObjDSound As DirectSound8
Set gObjDSound = DirectX8.DirectSoundCreate(vbNullString)

The following objects must be created by calling the appropriate DirectX8 method. See the DirectX Class Reference for details.