在C#中暂停和恢复Windows

在C#中暂停和恢复Windows

本文介绍了在C#中暂停和恢复Windows Media Player的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作VoIP应用程序,我只想能够暂停和恢复Windows Media Player的状态(并可能检查播放器的状态)。我在SO上找到的解决方案是WMPLib,但这是用于将WMP嵌入到我的.NET应用程序中。我只是想暂停并恢复当前实例(如果有)。

I'm making an VoIP application and I just want to be able to pause and resume (and probably check the player state) of Windows Media Player. Solutions I've found on SO refer to WMPLib but this is for embedding WMP in my .NET application. I simply just want to pause and resume the current instance if there is one. Is there documentation for this somewhere?

推荐答案

做到这一点的一种方法是使用WMP插件,然后您可以调用它。 会执行类似的操作(仅通过全局击键进行交互。)它位于sourceforge上,因此其来源可能是

One way to do this would be with a plugin for WMP that you could then call. WMPKeys does something like this (only it interacts via global keystrokes.) It's on sourceforge, so its source may be available.

Windows 7确实知道如何在麦克风打开时调整系统音量。而不是暂停,您可能只想调整音量。

Windows 7 does know how to adjust system volume during times when the microphone is on; rather than pausing, you might want to just adjust volume instead.

这篇关于在C#中暂停和恢复Windows Media Player的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 11:42