How to use DirectX.DirectInput in XNA

前端 未结 1 785
迷失自我
迷失自我 2021-01-16 03:34

joystick.cs

using System;
using Microsoft.DirectX.DirectInput;

namespace gameproject
{
    /// 
    /// Description of device.
    /// 

        
相关标签:
1条回答
  • 2021-01-16 04:17

    SetCooperativeLevel takes System.Windows.Forms.Control object as a first parameter (where you have null), so you should still reference assembly where this class is defined in your application. Add reference do System.Windows.Forms.dll from your app/game and try then. If code you are using is using some other classes that you haven't referenced under the hood, it's ok, but when they are public (like they are parameter or are returned from methods you are calling), you have to reference assemblies in which those types are defined.

    Similar stackoverflow post: Debugging error "The Type 'xx' is defined in an assembly that is not referenced"

    0 讨论(0)
提交回复
热议问题