我的 WinForm 上有一个 AxWindowsMediaPlayer 控件。
到目前为止一切正常。但我无法调整大小或移动控件。
我像这样初始化控件:
mediaPlayer = new AxWMPLib.AxWindowsMediaPlayer();
mediaPlayer.CreateControl();
mediaPlayer.enableContextMenu = false;
((System.ComponentModel.ISupportInitialize)(mediaPlayer)).BeginInit();
mediaPlayer.Name = "wmPlayer";
mediaPlayer.Enabled = true;
mediaPlayer.Dock = System.Windows.Forms.DockStyle.Fill;
mediaPlayer.Size = this.Size;
this.Controls.Add(mediaPlayer);
((System.ComponentModel.ISupportInitialize)(mediaPlayer)).EndInit();
mediaPlayer.uiMode = "none";
mediaPlayer.URL = fileName;
mediaPlayer.settings.setMode("loop", true);
mediaPlayer.Ctlcontrols.play();
但大小始终相同。如何设置此控件的大小或边界?
感谢帮助