Ok. So.

I'm trying to develop an application to capture the input buffer to identify a device's input commands to build a user control that uses this commands for further use.

I'm actually developing a project that simulates Guitar Hero, and I want it to recognise the Guitar Hero Controller's input.

I know there are already several controls that work with the guitar hero controller. The thing is i MUST develop this control myself.

What i've done so far only recognises input from the keyboard using Console.OpenStandardInput() . The thing is, as the class name says, it reads input from the Console... not from all sources possible, such as mouse, and other peripherals (joystick, and as i need it, Guitar Hero Controller)

Here's my code:

Sub Main()
        Dim Data As System.IO.Stream
        Dim buff(32) As Byte
        Dim buffOut() As Byte
        Data = Console.OpenStandardInput()

        'Dim DataBuff As System.IO.BufferedStream
        'DataBuff = System.IO.BufferedStream.Synchronized(Data)
        Using memoryStream As New System.IO.MemoryStream
            Dim count As Integer
                count = Data.Read(buff, 0, buff.Length)
                memoryStream.Write(buff, 0, count)
            Loop While count <> 0
            buffOut = memoryStream.ToArray()
        End Using
    End Sub

I guess (since i don't really know) all i need is guidance towards the right input buffer to use for this purpose, since the Console Input Buffer is not working for me.

Thanks in advance!!

The first post gets the point of reading input... from the mouse. I might implement it somewhere else, so thanks anyway. The second post is a little bit more close to what i need... definitely will take a look. I'll post results when i try it

Also, a quick Google search of "vb.net read input from game controller" turns up quite a few entries including this by Microsoft (its in C# but might give you some ideas on where to start looking):


This link is exactly what I was looking for. unfortunately it doesn't seem to be .net 4.0 compatible. So far further google searches have been unsuccessful.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.