开发者

How to make Windows Media Player Control display still images correctly in a C#.NET project

I'm building a small media selector application. All medias of a given directory are loaded one by one based on left/right key navigation and displayed in Windows Media Player control that is on a windows form (C#).

开发者_运维技巧

I works well with videos, audio, but less with still images.

The image is displayed correctly, but after a few seconds it disapears. I looks like the media player is "playing" it for a few second, then "stop" it.

How can I make the Windows Media Player control to stay on the image until I load another media in the player ?


Here is how I solved the problem. In case the loaded media is an image, I pause the WMPC. It works, but I don't like it.

                ThreadStart start = new ThreadStart(delegate() {
                    Thread.Sleep(2000);
                    this.axWindowsMediaPlayer1.Ctlcontrols.pause();
                });

                start.BeginInvoke(null, null);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜