不能在表单中使用类设备

时间:2014-01-25 02:11:11

标签: c# directx

我想访问从DirectX创建“Device”类的实例。像在这个例子中: http://msdn.microsoft.com/en-us/library/windows/desktop/bb153258(v=vs.85).aspx 但我有这个错误:The type or namespace name 'Device' could not be found. 我真的搜索了我的问题,但没有找到任何有用的东西。我从C:\ Windows \ Microsft.NET导入了Microsoft.DirectX.Direct3DX.dll ... 但没有任何事情发生,所以如果你能帮助我那真的很棒!

如果你想要代码:

    using System;
using System.Collections.Generic;
using System;
using System.Drawing;
using System.Windows.Forms;
using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;
using System.Runtime.InteropServices;

namespace testing
{
    public partial class Form1 : Form
    {
        private Device device = null;
...

1 个答案:

答案 0 :(得分:0)

你必须把DirectSound.Device = null;