程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> .NET網頁編程 >> .NET實例教程 >> 試用暴風影音2的mps.dll控件做簡單的播放器

試用暴風影音2的mps.dll控件做簡單的播放器

編輯:.NET實例教程

1.先用aximp.exe工具在.Net SDK命令提示下轉換為兩個程序集 2.把它們放到BIN目錄的DEBUG下,並在解決方案中添加引用 3.下面的代碼就是創建暴風影音控件的主要過程

  using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using AxMPSLib; using MPSLib; namespace WindowsApplication5 { public partial class Form1 : Form { AxMPSLib.AxStormPlayer splayer = new AxStormPlayer(); public Form1() { InitializeComponent(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); ((System.ComponentModel.ISupportInitialize)(splayer)).BeginInit(); this.SuspendLayout(); // // axStormPlayer1 // splayer.Enabled = true; splayer.Location = new System.Drawing.Point(10, 10); splayer.Name = "axStormPlayer1"; splayer.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("splayer.OcxState"))); splayer.Size = new System.Drawing.Size(400, 360); splayer.TabIndex = 0; this.Controls.Add(splayer); ((System.ComponentModel.ISupportInitialize)(splayer)).EndInit(); this.ResumeLayout(false); } private void Form1_Load(object sender, EventArgs e) { //splayer.backImage = "D:/web設計素材/User Account Pictures/Default Pictures/coolman.bmp"; splayer.Dock = DockStyle.Fill; splayer.controlBarVisible = 0; splayer.titleVisible = 0; splayer.infoBarVisible = 0; splayer.contextMenuEnable = 0; splayer.displayMode = KRVIDEODISPLAYMODE.KVDM_Tile; splayer.Width = 320; splayer.Height = 240; splayer.URL = "D:/media/2020832122411189479486991000321.avi"; splayer.autoPlay = 0; splayer.play(); // splayer.titleImage = "D:/web設計素材/User Account Pictures/Default Pictures/34.bmp"; } } }

 

暴風2的內核似乎不是MPC 了,應該是酷熱影音的,呵呵,真是又意思現在我也要做一個播放器的項目,老板要我用MPC源代碼做,正在著急中

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved