Al

Al

  • NA
  • 2
  • 0

C# Emulate Keyboard Media Buttons

Jan 5 2011 2:34 AM
From my application I'm trying to emulate a keyboard press of the Media Play/Pause button ( System.Windows.Forms.Keys.MediaPlayPause ). I want this to act like the keyboard, when I use it it will pause Windows Media Player, or make it start playing again. Any idea how to go about that? I've tried using SendKeys.Send(), and tried to P/Invoke the keybd_event in user32.dll and no luck there.