DirectX 8 - Tutorials - DirectX 8 Basics - Initialization

This is the easiest part of making a DirectX 8 game, so don't think that this is gunna be all fun and dandy.

Now, many programs will tend to do things in many different ways, so I am not going to make these tutorials so only certain programmers can use it.

Now we need to initiate the DX object. For your information, using Public DX As New DirectX8 is much slower than Public DX As DirectX8 because in the before case, it is creating the DX object as a late-bound, and not a early-bound. Early-bound objects are MUCH faster.

Public DX As DirectX8
'In Private Sub Form_Load() or Sub Main()
    Set DX = New DX
    If Err.Number <> 0 Then
        'DX is probably not install, replace this with
        'a Msgbox or something

        Exit Function
    End If

Now that wasn't too hard, well that's hardly anything to you, but believe me, it is a lot!