none
有關visual studio 2005中的com元件 RRS feed

  • 問題

  • 對不起各位前輩,我又有問題了,是有關於上次的windows media player元件的問題,我想問的是當我把com元件附在form上時,它是屬於一個物件,來用於呼叫media player的內建函式庫,還是它已經是一個新的播放器面版了,也還請各位前輩能否告知更多有關windows media player的按鈕所傳的值,下面是我拉了windows media player的com元件之後,在裡面所寫的程式碼,所以才有以上的疑問

    namespace 介面2
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }

            private void 開啟ToolStripMenuItem_Click(object sender, EventArgs e)
            {
                if (openFileDialog1.ShowDialog() == DialogResult.OK)
                {
                    axWindowsMediaPlayer1.URL = openFileDialog1.FileName;
                }

     

            }

            private void 結束ToolStripMenuItem_Click(object sender, EventArgs e)
            {
                Application.Exit();
            }

            private void noneToolStripMenuItem_Click(object sender, EventArgs e)
            {
                axWindowsMediaPlayer1.uiMode = "None";
            }

            private void miniToolStripMenuItem_Click(object sender, EventArgs e)
            {
                axWindowsMediaPlayer1.uiMode = "Mini";

            }

            private void fullToolStripMenuItem_Click(object sender, EventArgs e)
            {
                axWindowsMediaPlayer1.uiMode = "Full";
            }

            private void invisibleToolStripMenuItem_Click(object sender, EventArgs e)
            {
                axWindowsMediaPlayer1.uiMode = "Invisible";
            }

            private void axWindowsMediaPlayer1_Enter(object sender, EventArgs e)
            {

            }

        }
    }

    2008年6月2日 下午 12:37

解答

所有回覆