Microsoft Corporation
December 1999
Summary: This article introduces technologies used by and applications that can be built with Microsoft DirectX for Visual Basic, and suggests how to use it. (3 printed pages)
Microsoft® DirectX® has traditionally been the domain of C and C++ developers developing game content. By providing language support for Microsoft Visual Basic®, the DirectX API, version 7.0 and later, is opened up to Visual Basic developers writing similar or very different kinds of applications. The goal of the project is simply to provide the same access to high performance multimedia functionality that’s available to C developers. To that end, we will also provide an SDK with sample code and helper controls to make DirectX accessible and easier to understand for the Visual Basic programmer.
At the core of DirectX for Visual Basic is a DLL that marshals objects between the DirectX run time and Visual Basic. The DLL exposes DirectX functionality using types that are friendly to Visual Basic and insulates the Visual Basic developer from some of DirectX’s object semantics. To provide the most flexibility and speed, the object model mirrors that of C.
Microsoft DirectDraw® | Image manipulation, transparent BLTs, direct access to the display. |
Microsoft DirectSound® | Mix, record, position, and change the character of sound. |
Microsoft Direct3D® | Draw three-dimensional (3-D) objects, a triangle at a time. |
Microsoft DirectInput® | Get real-time access to joystick, keyboard, mouse, and USB input devices. |
Microsoft DirectPlay® | Connectivity management. |
Microsoft DirectMusic® | Playback capability. |
You name it!
You might use DirectDraw to...
You might use DirectSound to...
You might use Direct3D to...
You might use DirectInput for...
You might use DirectPlay to...
You might use DirectMusic to...
Use them all. Use your imagination.
The DirectX C API can be complex for the sake of flexibility. The DirectX for Visual Basic SDK provides many samples, tutorials, and helper controls to make using DirectX easy while keeping consistent with the C API. Also included with the SDK is a complete set of Visual Basic-centered reference help.
The SDK includes sample controls implemented on top of DirectX for Visual Basic, providing a starting point for developers.
RMCanvas | Sets up a scene with default lights, camera, and render target, making it easy to render 3-d geometry in a few lines of code. |
IMCanvas | Initialized DirectDraw and Direct3D and a Direct3D device. Developer needs only to use the device and start drawing triangles. |