找回密码
 加入
搜索
查看: 1267|回复: 1

GUICtrlCreateAvi支持avi?

[复制链接]
发表于 2008-12-3 11:27:11 | 显示全部楼层 |阅读模式
在看帮助里面的示例,修改了一些东西,不知道为什么不能成功,会报损坏的图像



#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
发表于 2010-3-26 10:45:55 | 显示全部楼层
本帖最后由 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
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-7-5 12:11 , Processed in 0.071977 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表