本文介绍了如何以编程方式更改axWindowsMediaPlayer中的可视化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!



我使用axWindowsMediaPlayer控件来播放音频流,我想以编程方式更改可视化。我怎么能实现这个目标?

我用谷歌搜索了一下,但我找不到任何好的东西。我错过了什么?

Hi!

I use axWindowsMediaPlayer control to play audio streams and I would like to change visualization programmatically. How can I achieve this?
I've googled a bit, but I couldn't find anything good. Am I missing something?

推荐答案

public void SetCurrentEffectPreset(int value)
{
    WindowsIdentity identity = WindowsIdentity.GetCurrent();
    string path = string.Format("{0}\\Software\\Microsoft\\MediaPlayer\\Preferences", identity.User.Value);
    RegistryKey key = Registry.Users.OpenSubKey(path, true);
    if (key == null)
        throw new Exception("Error! Registry not found!");
    key.SetValue("CurrentEffectPreset", value, RegistryValueKind.DWord);
    AxWindowsMediaPlayer1.BeginInit();
 }


这篇关于如何以编程方式更改axWindowsMediaPlayer中的可视化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-12 05:29