简体   繁体   English

AxWindowsMediaPlayer-黑屏

[英]AxWindowsMediaPlayer - black screen

I'm building a desktop app in c# that uses AxWindowsMediaPlayer and is working nice, but when i kill explorer.exe (because i'm trying simulate kiosk mode on windows 10 home) the AxWindowsMediaPlayer control doesn't play, only shows a black screen. 我正在c#中构建一个使用AxWindowsMediaPlayer的桌面应用程序,并且运行良好,但是当我杀死explorer.exe时(因为我正在尝试在Windows 10 home上模拟信息亭模式),AxWindowsMediaPlayer控件无法播放,仅显示黑色屏幕。

What can i do to put it work? 我该怎么做才能使其正常工作? Or any alternative for AxWindowsMediaPlayer? 还是AxWindowsMediaPlayer的替代品?

I just need something to simulate screen saver; 我只需要一些东西来模拟屏幕保护程序; slide show to pictures and sometimes play some videos with no play/pause/stop... controls. 幻灯片放映到图片,有时播放一些没有播放/暂停/停止...控件的视频。

Thank you 谢谢

Adding this line resolved the issue. 添加此行解决了该问题。

Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);

Thank you. 谢谢。

I would consider using DirectX rather than the WMP control, you'll have more control and probably less overhead. 我会考虑使用DirectX而不是WMP控件,您将拥有更多的控件并且可能会减少开销。

See: 看到:

http://www.c-sharpcorner.com/UploadFile/mgold/PlayingVideo11242005002218AM/PlayingVideo.aspx http://www.c-sharpcorner.com/UploadFile/mgold/PlayingVideo11242005002218AM/PlayingVideo.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM