快进件不能用,
还有很多问题大家看看就知道了。
书上说可以看电影的,我怎么也看不了。。。
郁闷了!!!!
Private Sub Form_Load() With MMControl1 '设备Picture1为视频回放的窗体 .hWndDisplay = Picture1.hWnd '设置通知和非阻塞状态 .Notify = True .Wait = False End With End Sub
Private Sub MMControl1_Done(NotifyCode As Integer) With MMControl1 If .Error <> 0 Then MsgBox "Error#" & .Error & ":" & .ErrorMessage End If End With End Sub
Private Sub MMControl1_StatusUpdate() With MMControl1 If .DeviceID <> 0 Then If Slider1.Value <> .Position Then Slider1.Value = .Position End If End If End With End Sub
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If MMControl1.Command = "play" Then MMControl1.Command = "stop" Else MMControl1.Command = "play" End If End Sub
Private Sub 打开_Click() CommonDialog1.FileName = "" CommonDialog1.Flags = &H800 CommonDialog1.Filter = "All files(*.*)|*.*" + "|MPEG Video Files(*.mpg;*.mpeg)|*.mpg;*.mpeg;" + "|Audio files(.wav)|*.wav" + "|Video for Windows files(.avi)|*.avi" + "|MIDI sequencs(.mid)|*.mid" CommonDialog1.FilterIndex = 2 CommonDialog1.DialogTitle = "打开文件" CommonDialog1.Action = 1 If CommonDialog1.FileName <> "" Then '如果选择了文件,把文件传递给MMControl1控件 MMControl1.FileName = CommonDialog1.FileName '打开这个设备 MMControl1.Command = "open" '根据媒体文件的长度,设置滑杆的参数 Slider1.Max = MMControl1.Length Slider1.SmallChange = 1 Slider1.LargeChange = Slider1.Max / 10 End If End Sub
Private Sub 关闭_Click() If MMControl1.Mode <> micModeNotOpen Then '首先停止MCI设备的运行,然后关闭之 MMControl1.Command = "stop" MMControl1.Command = "close" End If Unload Me End Sub
Private Sub 结束_Click() If MMControl1.Mode <> mciModeNotOpen Then '首先停止MCI设备的运行,然后关闭之 MMControl1.Command = "stop" MMControl1.Command = "close" End If End Sub 这是源代码 小弟还不知道怎么把播放器样子发上来。。 各位大侠不要笑偶哦!!