如何以编程方式更改axWindowsMediaPlayer中的可视化? [英] How to change visualization in axWindowsMediaPlayer programmatically?

查看:98
本文介绍了如何以编程方式更改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?

推荐答案

我认为唯一的方法就是使用注册表。

在此试试这个。:

The only way I believe there is , is by using the registry.
Here try this .:
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中的可视化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆