| 发表于:2008-02-18 11:33:252楼 得分:0 |
private sub cek1_click() if cek1.value = 1 then mmc1.command = "play" end if end sub private sub form_load() mmc1.pauseenabled = true mmc1.playenabled = true mmc1.stopenabled = true end sub private sub form_unload(cancel as integer) if not mmc1.mode = 524 then mmc1.command = "close" end if end sub private sub mmc1_done(notifycode as integer) mmc1.updateinterval = 100 end sub private sub mmc1_statusupdate() on error goto erropen mmc1.timeformat = 0 sld1.min = 0 sld1.max = mmc1.length / 1000 if mmc1.position <> mmc1.length then sld1.value = mmc1.position / 1000 else mmc1.command = "prev" sld1.value = 0 end if mmc1.hwnddisplay = pic1.hwnd stb1.panels(2) = tstring(mmc1.length - mmc1.position) stb1.panels(4) = tstring(mmc1.length) label1.caption = "00:00" label2.caption = tstring(mmc1.length / 2) label3.caption = tstring(mmc1.length) select case mmc1.mode case 524 stb1.panels(5) = "未打开设备......" case 525 stb1.panels(5) = "停止状态......" case 526 stb1.panels(5) = "正在播放..." & cdg1.filetitle case 527 stb1.panels(5) = "正在录音......" case 528 stb1.panels(5) = "正在搜索......" case 529 stb1.panels(5) = "暂停播放中......" case 530 stb1.panels(5) = "准备就绪......" end select if mmc1.position = mmc1.length then mmc1.to = 0 mmc1.updateinterval = 0 mmc1.command = "prev" mmc1.command = "stop" end if if cek1.value = 1 then mmc1.command = "play" end if erropen: exit sub end sub private sub mmc1_stopclick(cancel as integer) mmc1.to = 0 mmc1.updateinterval = 0 cek1.value = 0 mmc1.command = "prev" end sub private sub mnuclose_click() mmc1.command = "stop" mmc1.command = "close" mnuclose.enabled = false end sub private sub mnuexit_click() mmc1.command = "stop" mmc1.command = "close" end end sub private sub mnuopen_click() mmc1.command = "stop" mmc1.command = "close" cdg1.filter = "声音*.wav ¦*.wav ¦(vcd*.dat) ¦*.dat ¦(avi视频*.avi) ¦*.avi" cdg1.showopen mmc1.notify = false mmc1.wait = true mmc1.shareable = false mmc1.devicetype = "" mmc1.filename = cdg1.filename mmc1.command = "open" mnuclose.enabled = true sld1.visible = true end sub public function tstring(sm as long) as string s = (sm / 1000 / 60) mod 60 m = (sm / 1000) mod 60 tstring = format(s, "00") & ":" & format(m, "00") end function 首先先谢谢你愿意为我考虑这个问题。 这个是我的代码,根据你提供的条件判断,视频文件在windows media player中是可以播放的 如果要是视频解码器不全的话请指点个地址可以下载呢。。。 谢谢。 | | |
|