What I am trying to do is execute a media key to the operating system. eg: if a user presses a button, it will change the track in itunes or wmp etc.
I am using .Net in C#.
any help appreciated.
What I am trying to do is execute a media key to the operating system. eg: if a user presses a button, it will change the track in itunes or wmp etc.
I am using .Net in C#.
any help appreciated.
You want to make it appear as though the user pressed one of the media keys on the keyboard?
Use the Windows SendInput function and pass it a KEYBDINPUT structure containing, for instance, VK_MEDIA_NEXT_TRACK.
All gathered right here @ stackoverflow:
http://www.codeproject.com/KB/cs/CSLLKeyboardHook.aspx
How can I register a global hot key to say CTRL+SHIFT+(LETTER) using WPF and .NET 3.5?
http://bloggablea.wordpress.com/2007/05/01/global-hotkeys-with-net/
Enjoy it :)