在窗体上拖放一个按钮,用以动态的载入Windows Media Player 窗口。载入时可以选择其显示模式(uiMode:string类型)

可见:http://msdn.microsoft.com/en-us/library/dd562469(VS.85).aspx

 代码:

namespace TestPanel

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }


        private AxWMPLib.AxWindowsMediaPlayer myplayer = new AxWMPLib.AxWindowsMediaPlayer();


        private void btnload_Click(object sender, EventArgs e)

        {

            this.panel1.Controls.Add(myplayer);  //动态添加

            myplayer.uiMode = "None";              //选择模式

            myplayer.Height = this.panel1.Height;

            myplayer.Width = this.panel1.Width;

          


        }



    }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-11
  • 2021-05-25
  • 2022-01-29
  • 2021-10-04
  • 2021-12-23
  • 2021-10-18
猜你喜欢
  • 2022-12-23
  • 2021-11-19
  • 2021-12-28
  • 2022-12-23
  • 2022-12-23
  • 2021-10-25
相关资源
相似解决方案