0

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.

instigator
  • 1,587
  • 5
  • 15
  • 27

2 Answers2

1

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.

Tim Robinson
  • 53,480
  • 10
  • 121
  • 138