1、Media playerwmp.dllwmp.URL=XXXX;wmp.play()OKdotnetdotnetvsvs AxImp.exedllocxAxHost(msdn) WMPLib.dllAxInterop.WMPLib.dllInterop.WMPLib.dll System.Windows.Forms.AxHostnew飬UI AxWMPLib.AxWindowsMediaPlayer wmp = new AxWMPLib.AxWindowsMediaPlayer(); this.Controls.Add(wmp); wmp.URL = .mp3; wmp.Ctlcontrols
2、.play();showLoadLoad showSystem.Windows.Forms.AxHost+ InvalidActiveXStateExceptionshowInitializeComponentplay(System.ComponentModel.ISupportInitialize)(this.wmp1).BeginInit()/EndInit()this.wmp1.OcxState = (System.Windows.Forms.AxHost.State)(resources.GetObject(wmp1.OcxState); MSDNocxstatecom ocxstat
3、eBeginInitEndInitcurrentMediawmp1.currentPlaylist.appendItem(wmp1.newMedia(.mp3)currentPlaylistwmprmvb wmp.settings.enableErrorDialogs=false wmp.Ctlcontrols.play()3mps.dllwmpwmpwmp11wmp API/API(MSDN) URL:String; uiMode:String; Full, Mini, None, Invisible()playState:integer; PlayStateChangeStateChang
4、eWMPLib.WMPPlayStatewmppsUndefined = 0;/wmppsStopped = 1;/wmppsPaused = 2;/wmppsPlaying = 3;/wmppsScanForward = 4;/wmppsScanReverse = 5;/wmppsBuffering = 6;/wmppsWaiting = 7;/wmppsMediaEnded = 8;/wmppsTransitioning = 9;/wmppsReady = 10;/wmppsReconnecting = 11;/wmppsLast = 12;/,PlayStateChangermvb(wmppsReady)enableContextMenu:Boolean; /