How To Setup & Initialize Visual Basic 5/6 E-mail
A long time ago in a galaxy far, far away...
1. Requirements

You will need the Software Development Kit for The Game Basic 3D Engine. You can find this in the download section on this website. Once you have downloaded the setup you can install it by running the installer. Then follow the instructions given by the setup application.

2. References

To use The Game Basic 3D Engine in Microsoft Visual Basic 5/6® you need to add a reference to the DLL in your own project. The following image shows you how you can add this reference:

Image

3. Objects Declaration & Initialization

Create a new form, and add the following code:

Option Explicit
 
' Game Basic 3D Engine Build 4096
' Copyright © Monarke Studios. All Rights Reserved.
 
Private Engine As New GameBasic3D.Engine
 
' Temporarily define the screen properties.
Private Const Engine_Pixel As Long = 32
Private Const Engine_Width As Long = 800
Private Const Engine_Height As Long = 600
Private Const Engine_Screen As Boolean = False
 
Private Sub Form_Activate()
 
     ' Setup the form properties.
     Me.Width = Engine_Width * Screen.TwipsPerPixelX
     Me.Height = Engine_Height * Screen.TwipsPerPixelY
 
     ' Initialize the engine, and embark the main pipeline.
     If Not Engine.Initialize(Me.hWnd, Engine_Width, Engine_Height, Engine_Pixel, Engine_Screen) Then End
 
     Do: DoEvents
 
          ' Begin rendering to next frame buffer.
          Engine.BeginScene
 
          ' Synchronize with display buffer, and loop.
          Engine.EndScene
 
     Loop Until Engine.Unloaded
     End
 
End Sub
 
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
 
    ' Wait until the engine has finished before unloading the window.
    If Engine.Unloaded = False Then
       Engine.UnInitialize
        Cancel = True
    End If
 
End Sub
 
Private Sub Form_Unload(Cancel As Integer)
 
     ' Release all resources and return to the operating system.
     Set Engine = Nothing
 
End Sub
4. Distribution

If you want to distribute your Visual Basic project you will need to ship the Game Basic 3D Engine library with your application.