using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace UAS_MES.Query { public partial class Query_ShowVideo : Form { string type = ""; public Query_ShowVideo(string FileType) { InitializeComponent(); StartPosition = FormStartPosition.CenterScreen; MediaPlayer.PlayStateChange += MediaPlayer_PlayStateChange; type = FileType; } private void MediaPlayer_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e) { if ((int)MediaPlayer.playState == 1) { System.Threading.Thread.Sleep(1000); MediaPlayer.Ctlcontrols.play(); } } private void Query_ShowVideo_Load(object sender, EventArgs e) { MediaPlayer.URL = type; MediaPlayer.Ctlcontrols.play(); } } }