GUICtrlCreateAvi支持avi?
在看帮助里面的示例,修改了一些东西,不知道为什么不能成功,会报损坏的图像#include <GUIConstants.au3>
GUICreate ("我的 GUI 之动画",300,200)
;原来是:
;$ani1 = GUICtrlCreateAvi (@SystemDir & "\shell32.dll",150, 50,10)
;改成:
$ani1 = GUICtrlCreateAvi ("C:\Documents and Settings\lxm\My Documents\200305080374_1_0.avi",-1, -1,-1)
$buttonstart = GUICtrlCreateButton ("开始",50,150,70,22)
$buttonstop= GUICtrlCreateButton ("停止",150,150,70,22)
GUISetState( )
; 运行脚本直到窗口被关闭
While 1
$msg = GUIGetMsg()
Select
case $msg = $GUI_EVENT_CLOSE
ExitLoop
case $msg = $buttonstart
GUICtrlSetState ($ani1, 1)
case $msg = $buttonstop
GUICtrlSetState ($ani1, 0)
EndSelect
Wend 本帖最后由 newuser 于 2010-3-26 11:00 编辑
回复 1# liangxm
我也有这个问题,本想发新帖问一下,但想还是搜索一下答案吧,结果发现这个问题没人回答,呵呵!等待中...
找到答案了 ,说不支持 有声 AVI,不过我还是找到了以下好使的代码,但它的标题没有"已解决"标志啊 ,害的我好找,呵呵!
#include <GUIConstants.au3>
$x=ObjCreate("WMPlayer.OCX")
$Form1 = GUICreate("AForm1", 500,400, 193, 200)
$Button1 = GUICtrlCreateButton("开始", 104, 344, 97, 33, 0)
$Button2 = GUICtrlCreateButton("停止", 272, 336, 121, 41, 0)
$sky=GUICtrlCreateObj($x, 100,50,500,500)
GUISetState(@SW_SHOW)
$x.uimode="none"
$x.url="1.avi"
$x.Controls.play
;MsgBox(0,"",$sky)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
页:
[1]