Executing keyboard command in OS

What I am trying to do is run the media key for the operating system. eg: if the user clicks a button, this will change the track in itunes or wmp, etc.

I am using .Net in C #.

any help is appreciated.

0


a source to share


2 answers


+1


a source


Do you want to make it appear as if the user pressed one of the media keys on the keyboard?



Use a function SendInput

and pass it a structure KEYBDINPUT

containing, for example VK_MEDIA_NEXT_TRACK

.

+1


a source







All Articles