Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To VP or not VB that is the question
Message
From
10/12/2001 12:45:54
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00592024
Message ID:
00592218
Views:
15
Glenn,
I don't know. Maybe it's the avi file you're trying. Doesn't work with all .avi files. Worked right with fox and foxrain.avi but not for example DXMedia sample movie.avi
I have version 5.0.2161.1
Cetin

>Thanks so much Celtin, but after copying the code my VFP crashes upon executing the mcisendstring("open ... Perhaps my DLL is invalid?
>
>Glenn
>
>>>Nice try, but that didn't work either. Can you get it to load?
>>>
>>>Glenn
>>>
>>Glenn,
>>:) Yes it was a nice try. This time I copied code and checked.
>>You immediately close it in destroy. If object is public then it loads and plays. I also tried playing with wait (nice foxhead play:) - foxrain.avi).
>>Comment/uncomment to test play and wait/nowait.
>>
*public oTest
>>oTest = CreateObject('PlayAvi')
>>oTest.cFileName = GetFile('AVI')
>>oTest.Play()
>>
>>define class PlayAvi as relation
>>	cFileName	=	''
>>	function init
>>		declare long mciSendString in "winmm.dll" ;
>>		 string lpstrCommand, ;
>>		 string lpstrReturnString, ;
>>		 integer uReturnLength, ;
>>		 integer hwndCallBack
>>
>>	function play
>>	LOCAL lcRetString, lcFileName
>>		IF not EMPTY( this.cFileName) and not EMPTY(SYS(2000,this.cFileName))
>>			lcFileName = FULLPATH(this.cFileName)
>>			lcRetString = space(127)
>>			mciSendString(;
>>				'open "' + ;
>>				lcFileName + ;
>>				'" type avivideo alias video', ;
>>				lcRetString, 127, 0)
>>			mciSendString("set video time format ms", lcRetString , 127, 0)
>>			mciSendString("play video wait", lcRetString , 127, 0)
>>*			mciSendString("play video", lcRetString , 127, 0)
>>			mciSendString("close video ", lcRetString , 127, 0)
>>		ENDIF
>>	endfunc
>>    procedure destroy
>> *   lcRetString = space(127)
>> * 	 mciSendString("close video ", lcRetString , 127, 0)
>>    endproc
>>enddefine
>>
>>
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform