Download C# DirectX Control and Source Code (version 7)
See copyright notice

This is a DirectX control I wrote as a base to make DirectX applications easier to write.  Just create a form, plop down the control, write a draw function, and voila - you’re in business. 

The Direct3d class sets up the DirectX device, and is responsible for maintaining and drawing all of the visible controls.  It can resize itself to fit the form or it can go to full screen mode.  Use the DxLoaded event to create your AutoMesh’s, AutoTexture’s, and AutoVertexBuffer’s.  Use the DxRender3d event to draw your scene.

The AutoMesh, AutoTexture, AutoVertexBuffer, and AutoIndexBuffer classes manage the DirectX objects so that you don’t have to recreate them when the device is lost and restored.

Jeremy Spiller