|
|
Wiindows Media Player Controller Written on December 9, 2008, by Milot Shala. |
Sometimes when we watch movies on our computer, if we don’t have a laptop such as HP or Apple to have their own remote controllers, we miss the thing for increasing and decreasing, playing and pausing and sometimes even stopping our movie. Well I was having that problem for some time now and I’ve found my solution. My simple solution was to use a Nintendo Wii’s remote and a .NET library written by Brian Peek and is located here: http://www.codeplex.com/WiimoteLib. I wrote a program that listens to the Wii Remote button presses and then performs an action on Windows Media Player using P/Invoke functions from User32.dll, FindWindow (to find the player) and SendMessage to send a message to the handle window (in our scenario, Windows Media Player).
So here is our Wii Remote
legend:
Button “A” – Play/Pause
Button “B” – Stop
Button “+” – Volume Up
Button “-” – Volume Down
Button “Home” – Full Screen
So the main screen is this:
You can notice a red dot there, that is when the device is not connected, for e.g you forgot to connect the device with your computer, or the Wii Remote’s battery is gone, so whenever you see a green dot like a screenshot below, you can start using it:
For now I’ve provided you just the binary, but after refactoring the code and implementing something more interesting I will publish the code. So I will create a post for the code structure and implementation using the WiiremoteLib.
The path for download is here: http://codespartan.org/files/wiiController.rar
-
http://www.brianpeek.com/blog/pages/net-based-wiimote-applications.aspx .NET-based Wiimote Applications – BrianPeek.com
-
http://www.alexlab.net/blog/?p=119 Alex Blog » Blog Archive
-
ruckerz
-
http://codespartan.org/blog/ Milot
-
iceman321
-
http://codespartan.org/blog/ Milot Shala
2,056 views



