简体   繁体   English

如何在c#中控制Windows Media Player的实例?

[英]How can I control an instance of Windows Media Player in c#?

I'm trying to control windows media player in c#. 我正在尝试在C#中控制Windows Media Player。 That means, I want to be able to programmically play songs. 这意味着,我希望能够以编程方式播放歌曲。 To reiterate, I'm talking about the full version of WMP, not the component you can embed into a windows form. 重申一下,我说的是WMP的完整版本,而不是您可以嵌入Windows窗体的组件。 I can launch the WMP process just fine, the problem comes in actually controlling it as I can't think of any keypresses I can send to the player that would tell it to select a song and play music. 我可以很好地启动WMP流程,问题出在实际控制它上,因为我想不出我可以发送给播放器的任何按键,告诉他们选择歌曲和播放音乐。 I can do this in iTunes just fine by sending a spacebar key-press to the process, but not so in Windows Media Player. 我可以在iTunes中做到这一点,只需向该过程发送一个空格键即可,但在Windows Media Player中则不能。 Does anyone have any ideas as per how I can control widows media player programmically in C#? 关于如何在C#中以编程方式控制寡妇媒体播放器,是否有人有任何想法? Is there a special command I can send to the process to complete this task? 我可以发送给流程以完成此任务的特殊命令吗?

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

相关问题 我怎么知道visual c#中的Windows Media Player控件何时播放完一首歌? - How can I know when a Windows Media Player control in visual c# has finished of playing a song? 如何使用C#控制媒体播放器? - How to control a Media Player with C#? 如何在C#中更改Windows Media Player的默认语言设置? - how can I change the default language setting of windows media player in c#? 如何在 C# 中与 Windows Media Player 交互 - How to interact with Windows Media Player in C# 如何在C#中与Windows Media Player交互 - How to interface with Windows Media Player in C# C#如何将winform中“Windows Media Player”控件的播放速率更改为小于0.5的值 - C# How to change playback rate of “Windows Media Player” control in winform to values less than 0.5 如何使 windows 媒体播放器控件的 URL 真正为空? - How can I make a windows media player control's URL truly null? 如何在嵌入式 Windows 媒体播放器控件上播放本地视频文件? - How can i play a local video file on embedded windows media player control? 如何更新的Windows Media Player专辑封面编程在C# - How to update Windows Media Player Album Art programatically in C# 如何使用 C# 更改 Windows 媒体播放器的纵横比 - How to change the aspect ratio of an Windows media player by using C#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM