Access Windows Media Player buttons programmatically

652 Views Asked by At

I'm making a C# windows application, in which I've embedded a Windows Media Player in my form. Now, instead of using the player in a normal way, I want to access its buttons, for e.g I want to hide its "Play" & "Pause" button.

In short, I want to customize the player according to my needs.

How can I do so?

1

There are 1 best solutions below

2
On

You will have to hook the creation of the app. Mainly the windows mesaage WM Create or WM Paint. There You have to check which window names the corresponding controls have. There are several tools to examine such things during runtime, which all use the windows hooking mechanism. However, I think this will fail for metro apps. You must read about hooks . Check codeproject.com for that, because You also will need to create at least one dll. And there is a good example in c, which surely can be ported to c#.Can I give You furthrer info?