Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
To VP or not VB that is the question
Message
De
10/12/2001 09:15:16
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
10/12/2001 09:11:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00592024
Message ID:
00592029
Vues:
19
While I am no expert in API, shouldn't you change #if .F. to #if .T.?

>What am I doing wrong here? I cannot load the DLL
>
>
>#if .f.
>	Playing an AVI file
>	this tip demonstrates how to play an AVI video file without using the Multimedia (MCI) control.
>
>	1. add a basic module with following code
>
>	declare function mciSendString Lib "winmm.dll" alias _
>	"mciSendStringA" (
>	ByVal lpstrCommand as string,
>	ByVal lpstrReturnString as string,
>	ByVal uReturnLength as long,
>	ByVal hwndCallback as long) as long
>
>	2. add following code to Form1
>
>	private Sub Form_Activate()
>	Dim returnstring as string
>	FileName as string
>	returnstring = space(127)
>	'Avifile to play'
>	FileName = "F:\Funstuff\Videos\Highperf\Welcome1.avi"
>	erg = mciSendString("open " & chr$(34) & FileName & chr$(34) & " type avivideo alias video", returnstring, 	127, 0)
>	erg = mciSendString("set video time format ms", returnstring, 127, 0)
>	erg = mciSendString("play video from 0", returnstring, 127, 0)
>	end Sub
>
>	'It is important to close the video, even if the file to play has run out.  To close the video, use the following line of code:'
>
>	erg = mciSendString("close video", returnstring, 127, 0)
>#endif
>
>define class PlayAvi as relation
>
>	cFileName	=	''
>
>	function init
>		declare long mciSendString in "wimm.dll" as alias mciSendStringA string, string, long, long
>
>	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 " + chr$(34) + ;
>				lcFileName + chr$(34) + ;
>				" type avivideo alias video", ;
>				lcRetString, 127, 0)
>			mciSendString("set video time format ms", lcRetString , 127, 0)
>			mciSendString("play video from 0", lcRetString , 127, 0)
>		ENDIF
>
>	function destroy
>		lcRetString = space(127)
>		= mciSendString("close video", lcRetString, 127, 0)
>
>enddefine
>
>
>Glenn
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform