Article ID: 124775
Article Last Modified on 10/15/2003
IF ! 'FOXTOOLS' $ SET('LIBRARY')
SET LIBRARY TO SYS(2004)+"FOXTOOLS.FLL" ADDITIVE
ENDIF
x=""
avi=REGFN("MciSendString","@C@CII","I","mmsystem")
foxwh=mainhwnd()
cmd="open c:\fpw26\tazmovie.avi type AVIVideo alias "+ ;
"Animation parent "+LTRIM(STR(foxwh))+" style "+LTRIM(STR(12345))
*open the avi file
ret = CALLFN(avi,@cmd,@x, 0, 0)
IF ret > 0
WAIT WINDOW "Problems"
ENDIF
* Put the window at location 10 10 relative to the parent window
* with a size of 200 200
cmd="put Animation window at 20 20 200 200"
ret = CALLFN(avi,@cmd,@x, 0, 0)
IF ret > 0
WAIT WINDOW "Cannot create child window"
ENDIF
* The wait tells the MCI command to complete before returning
* control to the application.
cmd="play Animation wait"
ret = CALLFN(avi,@cmd,@x, 0, 0)
IF ret > 0
WAIT WINDOW "Cannot play AVI"
ENDIF
* Close windows so they don't crash when you exit the application.
cmd="close Animation"
ret = callfn(avi,@cmd,@x, 0, 0)
IF ret > 0
WAIT WINDOW "Cannot close AVI window"
ENDIF
SET LIBRARY TO
Additional query words: VFoxWin FoxWin
Keywords: kbmm kbcode KB124775