简体   繁体   English

在Windows Media Player C#上滚动文本

[英]Scroll text over windows media player c#

I took a windowsMediaPlayer control. 我带了一个windowsMediaPlayer控件。 How can I set scroll text? 如何设置滚动文字?

    private void button1_Click(object sender, EventArgs e)
    {
        openFileDialog1.Filter = "(mp4,mov,wmv,mpg)|*.mp4;*.mov;*.wmv;*.mpg|all files|*.*";
        if (openFileDialog1.ShowDialog() == DialogResult.OK)
        {
            axWindowsMediaPlayer1.URL = openFileDialog1.FileName;

            //How can I set my scrolling text
            //axWindowsMediaPlayer1.ScrollText = "It is my demo text";
        }
    }

If your talking about the windows built-in media player then your going to have to get down and dirty with the Win32 API's, windows hooks, HWND, etc. You can't just paint a control on the window. 如果您谈论的是Windows内置媒体播放器,那么您将不得不使用Win32 API,Windows挂钩,HWND等来解决问题。您不能只在窗口上绘制控件。 What your talking about is some very low level windows coding. 您所说的是一些非常底层的Windows编码。

Take a look at Spy++ ( http://msdn.microsoft.com/en-us/magazine/cc163617.aspx ). 看看Spy ++( http://msdn.microsoft.com/zh-cn/magazine/cc163617.aspx )。 It's a tool from Microsoft that let's you delve into the details of a running application. 它是Microsoft提供的工具,可让您深入研究正在运行的应用程序的细节。 It has a component called ManagedSpyLib which wraps the C++ windows libraries in a managed library to make the windows hooks calls easier. 它具有一个称为ManagedSpyLib的组件,该组件将C ++ Windows库包装在托管库中,以使Windows挂钩调用更加容易。 Be ready to learn more about the OS than you ever wanted to know. 准备好比您想了解的更多有关操作系统的知识。 :-) :-)

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM