For Programmers: Free Programming Magazines  


Home > Archive > C# > November 2004 > C# and a USB foot pedal device









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author C# and a USB foot pedal device
Steve

2004-11-20, 8:56 am

Hello, I am trying to create a windows application that allows users
to playback .wav audio files in a windows application created using
c#.

I have embedded a windows media player into my form, and everything
works well, the next part of the program is to allow the users to
control the playback of the audio file with a foot pedal that is
connected to the computer via a USB connection.

Could someone please give me some help in this? Can the windows media
player be controlled by a USB foot pedal? If so how does one set this
up?

Can I capture the events of the foot pedal? If so how? Once I have
caught them I can just call the other methods that I have already
written to control the playback.

Any advice would be greatly appreciated.
Steve
Joel Martinez

2004-11-22, 8:57 pm

1. Can the wmp be controlled by a USB foot pedal?

- sure

2. How does one set this up?

- see answer to Q#3

3. Can I capture the events of the foot pedal?

- probably, you'll have to contact the manufacturer of the USB pedal
to see if they have an SDK you can use or something. Else you'll have
to dive into some painful IO port programming (search google for "C#
IO ports uncensored" for an idea on what you'll be in for ... the
article I'm thinking of is on codeproject I think)

Good luck,
Joel Martinez
http://www.onetug.org - Orlando .NET User Group
http://www.codecube.net - blog

sbkoppens@hotmail.com (Steve) wrote in message news:<a97bf82e.0411200237.1f82c500@posting.google.com>...
> Hello, I am trying to create a windows application that allows users
> to playback .wav audio files in a windows application created using
> c#.
>
> I have embedded a windows media player into my form, and everything
> works well, the next part of the program is to allow the users to
> control the playback of the audio file with a foot pedal that is
> connected to the computer via a USB connection.
>
> Could someone please give me some help in this? Can the windows media
> player be controlled by a USB foot pedal? If so how does one set this
> up?
>
> Can I capture the events of the foot pedal? If so how? Once I have
> caught them I can just call the other methods that I have already
> written to control the playback.
>
> Any advice would be greatly appreciated.
> Steve

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com