在打开的实例中打开媒体
您好,我正在使用 Windows 窗体应用程序 C#...我正在构建一个媒体播放器,我需要在本地打开一个文件。我在 program.cs 中获取了字符串数组,将其发送到我的 Form1.cs 现在我可以在媒体播放器中播放本地媒体。但是,问题是,如果我选择超过 1 个媒体并尝试打开它们,它们会在播放器的不同实例中打开。我想这样做: - 如果我的媒体播放器已经在运行,它会将文件路径发送到打开的媒体播放器实例,然后将媒体添加到当前播放列表 我在表单中使用 axWindowsMediaPlayer 。我该怎么做呢?
提前致谢!
Hi I'm using windows forms application C#... I'm building a media player for that I need to open a file locally. I got the string array in program.cs send it to my Form1.cs now I can play the local media in my media player. But, the problem is that if I select more than 1 media and try to open them they open in different Instances of the player. I want to do that:- If my media player is already running it will send the path of file to that opened instance of media player and then it will add the media to the current playlist
I'm using axWindowsMediaPlayer in my form. How can I do it?
Thanks In Advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的媒体播放器已经在运行,并且您想要将文件路径发送到打开的媒体播放器实例,然后将媒体添加到当前播放列表。可以参考下面的代码:
If your media player is already running and you want to send the path of file to that opened instance of media player and then add the media to the current playlist. You can refer to the following code: