Ghasem
Ghasem

Reputation: 15563

How to disable Windows Media Player controls individually

I'm working on a C# application which in I have a AxWindowsMediaPlayer control. I want to disable its controls individually, not all together. So far I have to use this code which disables all the controls

wmpPlayer.Ctlenabled = false;

Is there a way to disable for example just stop button?

I need to keep the Duration bar enabled and I don't want to hide them by uiMode.

Upvotes: 1

Views: 6551

Answers (4)

Briko
Briko

Reputation: 3

"I can't found a way to disable controls and make then invisible... but i got the same effect by dragging an image box just over the Window Media Controls, so user can't operate and see them..."

Answer to this, since i can't add a comment: To hide Windows Media Controls: Click on properties on the player > Controls Layout > None (This will hide the controls)

To make it invisible: Put a timer and put enabled = true on properties > right click on the timer and Show Code Here put in:

If you want to close the player:

axWindowsMediaPlayer1.close();    

if you want to hide the player, but still play in the background:

axWindowsMediaPlayer1.Hide();

Click properties on the timer again and choose a interval

This will make Windows Media Player close/hide after a time (interval)

Upvotes: 0

Briko
Briko

Reputation: 3

This should work for not being able to stop:

if (axWindowsMediaPlayer1.playState == WMPLib.WMPPlayState.wmppsPaused)
{
            axWindowsMediaPlayer1.Ctlcontrols.play();
}

Put this on a Timer and then 1 on interval. After that just copy the timer and past it 10 times. I don't know if it makes any difference, but works for me as now.

Upvotes: 0

Andrezila
Andrezila

Reputation: 40

@Alex Jolig I found the solucion.

1º Select the windows media player and click in property pages (the key in properties), click there.

image 1

And select modo, select none in place of mini!!

Image2

And There is

Welcome!!

Upvotes: 2

Mikeh Miiikeh
Mikeh Miiikeh

Reputation: 73

I can't found a way to disable controls and make then invisible... but i got the same effect by dragging an image box just over the Window Media Controls, so user can't operate and see them...

Upvotes: 0

Related Questions