- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在使用 WMPLib 在 C# 中制作一个简单的 mp3 播放器。我快完成了,但我还想做一件事。
我想知道这首歌走了多远,还想知道这首歌还剩多少。使用例如进度条。
谢谢
亚当
最佳答案
private void timer1_Tick(object sender, EventArgs e)
{
double percent = 0;
if (mp.Length != 0)
percent = ((double) wplayer.controls.currentPosition / wplayer.controls.currentItem.duration);
progressBar1.Value = (int)(percent * progressBar1.Maximum);
}
关于C# WMPLib mp3 的持续时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1876224/
我用下面的方法播放mp3s和m4as: private void playmp3(string path) { WMPLib.WindowsMediaPlayer a = ne
我正在尝试在我的 winforms 应用程序中播放音频。为此,我使用了这个: WMPLib.WindowsMediaPlayer wplayer = new WMPLib.Win
我正在使用 WMPLib 在 C# 中制作一个简单的 mp3 播放器。我快完成了,但我还想做一件事。 我想知道这首歌走了多远,还想知道这首歌还剩多少。使用例如进度条。 谢谢 亚当 最佳答案 priva
我目前使用这个DLL C:\Windows\System32\wmp.dll,我的代码是这样的 WMPLib.WindowsMediaPlayer wmp = new WMPLib.WindowsMe
我正在尝试导入 WMPLib 但 Visual Studio 但它给出了消息找不到类型或命名空间名称“WMPLib”。我也尝试过使用 System.Windows.Media 但对于 Media 它再
所以我想在 C# 中播放一个文件一段时间,函数是 void playfile(int duration) { wmp.controls.play(); Console.WriteLine("c
我有一个库 AXInterop.WMPLib,它让我发疯。这是我收到的错误。我没有使用任何其他依赖项。 堆栈跟踪: [FileLoadException: Could not load file or
我正在尝试使用 WMPLib 在 C# 中制作音乐播放器。这是我所拥有的: WMPLib.WindowsMediaPlayer song = new WMPLib.WindowsMediaPlayer
是否有可能改变通过 wmplib 播放的 mp3 文件的音量?改变程序本身的音量也可以。 有什么解决方案吗? 最佳答案 这是一种简单的方法。 示例: WMPlib.WindowsMediaPlayer
故事:我正在写一个由语音控制的音乐播放器。以前该项目使用 winamp 来播放音乐——我想取消它。我想将语音控制与音乐播放器集成在一起。问题是,当更改我的媒体播放器对象 (mplayer.settin
我正在尝试编写代码以从用户的 Windows Media Player 库中读取每个项目。此代码适用于大多数用户,但对于某些用户,当他们的 Windows Media Player 库中显然有成百上千
Error 1 Unknown build error, 'Cannot resolve dependency to assembly 'Interop.WMPLib, Version=1.0
我是一名优秀的程序员,十分优秀!