#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <wmp.au3>
#include <GuiAVI.au3>
$video = "1.avi"
$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 = $video
$x.Controls.play
;MsgBox(0,"",$sky)
While 1
$nMsg = GUIGetMsg()
If $x.playState = 1 Then
$x.Controls.play
EndIf
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$x.url = $video
$x.Controls.play
Case $Button2
_wmploadmedia($x, "stop")
EndSwitch
WEnd
回复 3# 那片叶子 |