Original Post
Hi everyone ! I wanted to start using DirectX with C#, but I've got a (major) problem. In the tutorial, they say to use the following code:
using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;The problem is that my compiler doesn't recognize neither DirectX nor Direct3D. I downloaded the DirectX SDK while I was programming in C++ but now I am going toward C# so it must not be the problem... unless there is a DirectX SDK for C# too... which would be a real pain since I'm on 56kbps and these downloads are something like 50Mo+ ... is there something really stupid I didn't see yet ? I used the following code:using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;
namespace DirectX_Tutorial
{
public class WinForm : System.Windows.Forms.Form
{
private Device device;
private System.ComponentModel.Container components = null;
public WinForm()
{
InitializeComponent();
}
protected override void Dispose (bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.Size = new System.Drawing.Size(500,500);
this.Text = "DirectX Tutorial";
}
static void Main()
{
using (WinForm our_dx_form = new WinForm())
{
Application.Run(our_dx_form);
}
}
}
}