bonjour à tous.
ou puis je trouver un exemple et des explications en français pour la
lecture de vidéo rn utilisant le controle mci mmcontrole.
D'avance merci de votre aide.
bonjour à tous.
ou puis je trouver un exemple et des explications en français pour la
lecture de vidéo rn utilisant le controle mci mmcontrole.
D'avance merci de votre aide.
bonjour à tous.
ou puis je trouver un exemple et des explications en français pour la
lecture de vidéo rn utilisant le controle mci mmcontrole.
D'avance merci de votre aide.
"DAN" a écrit dans le message de
news:4307127d$0$21295$bonjour à tous.
ou puis je trouver un exemple et des explications en français pour la
lecture de vidéo rn utilisant le controle mci mmcontrole.
D'avance merci de votre aide.
Hello,
dans le projet, ajouter le composant mci:
Projets/Composnants, choisir "Microsoft Multimedia Control 6.0"
(mci32.ocx)
On pilote ce controle via sa propriété Command.
Voici pour ouvrir une vidéo:
Private Sub Command1_Click()
MMControl1.FileName = "c:windowsclock.avi"
MMControl1.Command = "Open"
MMControl1.Command = "Play"
End Sub
Tout le reste est dans la doc.
--
Jean-marc
"There are only 10 kind of people
those who understand binary and those who don't."
mailto: remove '_no_spam_' ;
"DAN" <nospam@mediacd.fr> a écrit dans le message de
news:4307127d$0$21295$7a628cd7@news.club-internet.fr...
bonjour à tous.
ou puis je trouver un exemple et des explications en français pour la
lecture de vidéo rn utilisant le controle mci mmcontrole.
D'avance merci de votre aide.
Hello,
dans le projet, ajouter le composant mci:
Projets/Composnants, choisir "Microsoft Multimedia Control 6.0"
(mci32.ocx)
On pilote ce controle via sa propriété Command.
Voici pour ouvrir une vidéo:
Private Sub Command1_Click()
MMControl1.FileName = "c:windowsclock.avi"
MMControl1.Command = "Open"
MMControl1.Command = "Play"
End Sub
Tout le reste est dans la doc.
--
Jean-marc
"There are only 10 kind of people
those who understand binary and those who don't."
mailto: remove '_no_spam_' ; _no_spam_jean_marc_n2@yahoo.fr
"DAN" a écrit dans le message de
news:4307127d$0$21295$bonjour à tous.
ou puis je trouver un exemple et des explications en français pour la
lecture de vidéo rn utilisant le controle mci mmcontrole.
D'avance merci de votre aide.
Hello,
dans le projet, ajouter le composant mci:
Projets/Composnants, choisir "Microsoft Multimedia Control 6.0"
(mci32.ocx)
On pilote ce controle via sa propriété Command.
Voici pour ouvrir une vidéo:
Private Sub Command1_Click()
MMControl1.FileName = "c:windowsclock.avi"
MMControl1.Command = "Open"
MMControl1.Command = "Play"
End Sub
Tout le reste est dans la doc.
--
Jean-marc
"There are only 10 kind of people
those who understand binary and those who don't."
mailto: remove '_no_spam_' ;
Merci bien.
j'ai trouvé sauf que je ne parviens pas a ouvrir ma vidéo dans uns
picturebox je supose que l'on dois l'indiquer dans play pmais coment?
"Jean-Marc" a écrit dans le message de
43071e96$0$23543$
> "DAN" a écrit dans le message de
> news:4307127d$0$21295$
>> bonjour à tous.
>> ou puis je trouver un exemple et des explications en français pour la
>> lecture de vidéo rn utilisant le controle mci mmcontrole.
>> D'avance merci de votre aide.
>
> Hello,
>
> dans le projet, ajouter le composant mci:
> Projets/Composnants, choisir "Microsoft Multimedia Control 6.0"
> (mci32.ocx)
>
> On pilote ce controle via sa propriété Command.
> Voici pour ouvrir une vidéo:
>
> Private Sub Command1_Click()
>
> MMControl1.FileName = "c:windowsclock.avi"
> MMControl1.Command = "Open"
> MMControl1.Command = "Play"
>
> End Sub
>
> Tout le reste est dans la doc.
>
> --
> Jean-marc
> "There are only 10 kind of people
> those who understand binary and those who don't."
> mailto: remove '_no_spam_' ;
>
Merci bien.
j'ai trouvé sauf que je ne parviens pas a ouvrir ma vidéo dans uns
picturebox je supose que l'on dois l'indiquer dans play pmais coment?
"Jean-Marc" <NO_SPAM_jean_marc_n2@yahoo.fr> a écrit dans le message de
43071e96$0$23543$ba620e4c@news.skynet.be...
> "DAN" <nospam@mediacd.fr> a écrit dans le message de
> news:4307127d$0$21295$7a628cd7@news.club-internet.fr...
>> bonjour à tous.
>> ou puis je trouver un exemple et des explications en français pour la
>> lecture de vidéo rn utilisant le controle mci mmcontrole.
>> D'avance merci de votre aide.
>
> Hello,
>
> dans le projet, ajouter le composant mci:
> Projets/Composnants, choisir "Microsoft Multimedia Control 6.0"
> (mci32.ocx)
>
> On pilote ce controle via sa propriété Command.
> Voici pour ouvrir une vidéo:
>
> Private Sub Command1_Click()
>
> MMControl1.FileName = "c:windowsclock.avi"
> MMControl1.Command = "Open"
> MMControl1.Command = "Play"
>
> End Sub
>
> Tout le reste est dans la doc.
>
> --
> Jean-marc
> "There are only 10 kind of people
> those who understand binary and those who don't."
> mailto: remove '_no_spam_' ; _no_spam_jean_marc_n2@yahoo.fr
>
Merci bien.
j'ai trouvé sauf que je ne parviens pas a ouvrir ma vidéo dans uns
picturebox je supose que l'on dois l'indiquer dans play pmais coment?
"Jean-Marc" a écrit dans le message de
43071e96$0$23543$
> "DAN" a écrit dans le message de
> news:4307127d$0$21295$
>> bonjour à tous.
>> ou puis je trouver un exemple et des explications en français pour la
>> lecture de vidéo rn utilisant le controle mci mmcontrole.
>> D'avance merci de votre aide.
>
> Hello,
>
> dans le projet, ajouter le composant mci:
> Projets/Composnants, choisir "Microsoft Multimedia Control 6.0"
> (mci32.ocx)
>
> On pilote ce controle via sa propriété Command.
> Voici pour ouvrir une vidéo:
>
> Private Sub Command1_Click()
>
> MMControl1.FileName = "c:windowsclock.avi"
> MMControl1.Command = "Open"
> MMControl1.Command = "Play"
>
> End Sub
>
> Tout le reste est dans la doc.
>
> --
> Jean-marc
> "There are only 10 kind of people
> those who understand binary and those who don't."
> mailto: remove '_no_spam_' ;
>
Hello,
pour ce que tu veux faire, tu ne peux pas utiliser un PictureBox.
Tu dois utiliser un autre composant.
Il faut ajouter à ton projet le composant:
Microsoft Common Controls-2 5.0 ou 6.0. Cela va ajouter
quelques nouveaux controles dont le controle Animation.
Tu places ce controle sur ta forme (comme un Picture Box).
Par défaut le nom sera "Animation1"
Pour l'utiliser:
Private Sub Command1_Click()
Animation1.Open ("c:windowsclock.avi")
Animation1.Play
End Sub
et voila :-)
--
Jean-marc
"There are only 10 kind of people
those who understand binary and those who don't."
mailto: remove '_no_spam_' ;
--
Jean-marc
"There are only 10 kind of people
those who understand binary and those who don't."
mailto: remove '_no_spam_' ;
"DAN" a écrit dans le message de
news:43074e90$0$21300$Merci bien.
j'ai trouvé sauf que je ne parviens pas a ouvrir ma vidéo dans uns
picturebox je supose que l'on dois l'indiquer dans play pmais coment?
"Jean-Marc" a écrit dans le message de
news:43071e96$0$23543$
> "DAN" a écrit dans le message de
> news:4307127d$0$21295$
>> bonjour à tous.
>> ou puis je trouver un exemple et des explications en français pour
>> la
>> lecture de vidéo rn utilisant le controle mci mmcontrole.
>> D'avance merci de votre aide.
>
> Hello,
>
> dans le projet, ajouter le composant mci:
> Projets/Composnants, choisir "Microsoft Multimedia Control 6.0"
> (mci32.ocx)
>
> On pilote ce controle via sa propriété Command.
> Voici pour ouvrir une vidéo:
>
> Private Sub Command1_Click()
>
> MMControl1.FileName = "c:windowsclock.avi"
> MMControl1.Command = "Open"
> MMControl1.Command = "Play"
>
> End Sub
>
> Tout le reste est dans la doc.
>
> --
> Jean-marc
> "There are only 10 kind of people
> those who understand binary and those who don't."
> mailto: remove '_no_spam_' ;
>
Hello,
pour ce que tu veux faire, tu ne peux pas utiliser un PictureBox.
Tu dois utiliser un autre composant.
Il faut ajouter à ton projet le composant:
Microsoft Common Controls-2 5.0 ou 6.0. Cela va ajouter
quelques nouveaux controles dont le controle Animation.
Tu places ce controle sur ta forme (comme un Picture Box).
Par défaut le nom sera "Animation1"
Pour l'utiliser:
Private Sub Command1_Click()
Animation1.Open ("c:windowsclock.avi")
Animation1.Play
End Sub
et voila :-)
--
Jean-marc
"There are only 10 kind of people
those who understand binary and those who don't."
mailto: remove '_no_spam_' ; _no_spam_jean_marc_n2@yahoo.fr
--
Jean-marc
"There are only 10 kind of people
those who understand binary and those who don't."
mailto: remove '_no_spam_' ; _no_spam_jean_marc_n2@yahoo.fr
"DAN" <nospam@mediacd.fr> a écrit dans le message de
news:43074e90$0$21300$7a628cd7@news.club-internet.fr...
Merci bien.
j'ai trouvé sauf que je ne parviens pas a ouvrir ma vidéo dans uns
picturebox je supose que l'on dois l'indiquer dans play pmais coment?
"Jean-Marc" <NO_SPAM_jean_marc_n2@yahoo.fr> a écrit dans le message de
news:
43071e96$0$23543$ba620e4c@news.skynet.be...
> "DAN" <nospam@mediacd.fr> a écrit dans le message de
> news:4307127d$0$21295$7a628cd7@news.club-internet.fr...
>> bonjour à tous.
>> ou puis je trouver un exemple et des explications en français pour
>> la
>> lecture de vidéo rn utilisant le controle mci mmcontrole.
>> D'avance merci de votre aide.
>
> Hello,
>
> dans le projet, ajouter le composant mci:
> Projets/Composnants, choisir "Microsoft Multimedia Control 6.0"
> (mci32.ocx)
>
> On pilote ce controle via sa propriété Command.
> Voici pour ouvrir une vidéo:
>
> Private Sub Command1_Click()
>
> MMControl1.FileName = "c:windowsclock.avi"
> MMControl1.Command = "Open"
> MMControl1.Command = "Play"
>
> End Sub
>
> Tout le reste est dans la doc.
>
> --
> Jean-marc
> "There are only 10 kind of people
> those who understand binary and those who don't."
> mailto: remove '_no_spam_' ; _no_spam_jean_marc_n2@yahoo.fr
>
Hello,
pour ce que tu veux faire, tu ne peux pas utiliser un PictureBox.
Tu dois utiliser un autre composant.
Il faut ajouter à ton projet le composant:
Microsoft Common Controls-2 5.0 ou 6.0. Cela va ajouter
quelques nouveaux controles dont le controle Animation.
Tu places ce controle sur ta forme (comme un Picture Box).
Par défaut le nom sera "Animation1"
Pour l'utiliser:
Private Sub Command1_Click()
Animation1.Open ("c:windowsclock.avi")
Animation1.Play
End Sub
et voila :-)
--
Jean-marc
"There are only 10 kind of people
those who understand binary and those who don't."
mailto: remove '_no_spam_' ;
--
Jean-marc
"There are only 10 kind of people
those who understand binary and those who don't."
mailto: remove '_no_spam_' ;
"DAN" a écrit dans le message de
news:43074e90$0$21300$Merci bien.
j'ai trouvé sauf que je ne parviens pas a ouvrir ma vidéo dans uns
picturebox je supose que l'on dois l'indiquer dans play pmais coment?
"Jean-Marc" a écrit dans le message de
news:43071e96$0$23543$
> "DAN" a écrit dans le message de
> news:4307127d$0$21295$
>> bonjour à tous.
>> ou puis je trouver un exemple et des explications en français pour
>> la
>> lecture de vidéo rn utilisant le controle mci mmcontrole.
>> D'avance merci de votre aide.
>
> Hello,
>
> dans le projet, ajouter le composant mci:
> Projets/Composnants, choisir "Microsoft Multimedia Control 6.0"
> (mci32.ocx)
>
> On pilote ce controle via sa propriété Command.
> Voici pour ouvrir une vidéo:
>
> Private Sub Command1_Click()
>
> MMControl1.FileName = "c:windowsclock.avi"
> MMControl1.Command = "Open"
> MMControl1.Command = "Play"
>
> End Sub
>
> Tout le reste est dans la doc.
>
> --
> Jean-marc
> "There are only 10 kind of people
> those who understand binary and those who don't."
> mailto: remove '_no_spam_' ;
>
es tu certain u'il faut ajouter Microsoft Common Controls6.0. ce controle
m'indique un teléphone dans un carré et il ne connait pas les
instructions play et open.
es tu certain u'il faut ajouter Microsoft Common Controls6.0. ce controle
m'indique un teléphone dans un carré et il ne connait pas les
instructions play et open.
es tu certain u'il faut ajouter Microsoft Common Controls6.0. ce controle
m'indique un teléphone dans un carré et il ne connait pas les
instructions play et open.
"DAN" a écrit dans le message de
news:4307bcd4$0$21298$es tu certain u'il faut ajouter Microsoft Common Controls6.0. ce controle
m'indique un teléphone dans un carré et il ne connait pas les
instructions play et open.
Tu as inséré un:
"Microsoft Comm Control 6.0"
=> C'est le controle pour gérer le PORT SERIE !
il faut un:
"Microsoft Common Controls-2 5.0"
=> Celui la contient ce que tu veux...
--
Jean-marc
"There are only 10 kind of people
those who understand binary and those who don't."
mailto: remove '_no_spam_' ;
"DAN" <nospam@mediacd.fr> a écrit dans le message de
news:4307bcd4$0$21298$7a628cd7@news.club-internet.fr...
es tu certain u'il faut ajouter Microsoft Common Controls6.0. ce controle
m'indique un teléphone dans un carré et il ne connait pas les
instructions play et open.
Tu as inséré un:
"Microsoft Comm Control 6.0"
=> C'est le controle pour gérer le PORT SERIE !
il faut un:
"Microsoft Common Controls-2 5.0"
=> Celui la contient ce que tu veux...
--
Jean-marc
"There are only 10 kind of people
those who understand binary and those who don't."
mailto: remove '_no_spam_' ; _no_spam_jean_marc_n2@yahoo.fr
"DAN" a écrit dans le message de
news:4307bcd4$0$21298$es tu certain u'il faut ajouter Microsoft Common Controls6.0. ce controle
m'indique un teléphone dans un carré et il ne connait pas les
instructions play et open.
Tu as inséré un:
"Microsoft Comm Control 6.0"
=> C'est le controle pour gérer le PORT SERIE !
il faut un:
"Microsoft Common Controls-2 5.0"
=> Celui la contient ce que tu veux...
--
Jean-marc
"There are only 10 kind of people
those who understand binary and those who don't."
mailto: remove '_no_spam_' ;
"Jean-Marc" a écrit dans le message de
news: 430830d3$0$10959$"Microsoft Common Controls-2 5.0"
merci bien,cela fonctionne mais il n'accepte pas les fichiers mpg,as tu
une
solution?
du coup il ne sagit plus du controle mci et je n'ai pas acces au boutons
de controle? coment proceder?
"Jean-Marc" <NO_SPAM_jean_marc_n2@yahoo.fr> a écrit dans le message de
news: 430830d3$0$10959$ba620e4c@news.skynet.be...
"Microsoft Common Controls-2 5.0"
merci bien,cela fonctionne mais il n'accepte pas les fichiers mpg,as tu
une
solution?
du coup il ne sagit plus du controle mci et je n'ai pas acces au boutons
de controle? coment proceder?
"Jean-Marc" a écrit dans le message de
news: 430830d3$0$10959$"Microsoft Common Controls-2 5.0"
merci bien,cela fonctionne mais il n'accepte pas les fichiers mpg,as tu
une
solution?
du coup il ne sagit plus du controle mci et je n'ai pas acces au boutons
de controle? coment proceder?
Hello,
Pour le contrôle mci, je n'ai pas réussi à affecter un parent, mais par
les API mci on peut le faire comme ceci:
Option Explicit
Private Declare Function mciGetErrorString _
Lib "winmm.dll" _
Alias "mciGetErrorStringA" _
( _
ByVal fdwError As Long, _
ByVal lpszErrorText As String, _
ByVal cchErrorText As Long _
) _
As Long
Private 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
Private mClearVid As Boolean
Private Sub PlayVid(File As String, PBox As PictureBox, Optional Resize As
Boolean, Optional Async As Boolean = True)
Dim ReturnVal As Long
'Ferme le device si déjà ouvert
ClearVid
'Ouvre le fichier avi
ReturnVal = mciSendString("open " & File & " type avivideo alias
MyVideo parent " & PBox.hWnd & " style child", 0&, 0&, 0&)
If ReturnVal = 0 Then
'Positionne la vidéo à (0,0)-(largeur PBox,hauteur PBox)
If Resize Then
ReturnVal = mciSendString("put MyVideo window at 0 0 " & _
(PBox.ScaleWidth / Screen.TwipsPerPixelX) & " " & _
(PBox.ScaleHeight / Screen.TwipsPerPixelY), 0&, 0&, 0&)
Else
ReturnVal = mciSendString("put MyVideo window at 0 0", 0&, 0&,
0&)
End If
If Async Then
'Retient qu'il faudra fermer la video
mClearVid = True
ReturnVal = mciSendString("play MyVideo", 0&, 0&, 0&)
Else
'Joue la video (bloquant)
ReturnVal = mciSendString("play MyVideo wait", 0&, 0&, 0&)
'Ferme la video
ReturnVal = mciSendString("close MyVideo", 0&, 0&, 0&)
End If
Else
MsgBox ErrorString(ReturnVal)
End If
End Sub
Private Function ErrorString(ErrNum As Long) As String
Dim strBuff As String
Const MCIERR_MAX_LEN = 129
strBuff = String$(MCIERR_MAX_LEN, vbNullChar)
If mciGetErrorString(ErrNum, strBuff, MCIERR_MAX_LEN) Then
ErrorString = Left$(strBuff, InStr(1, strBuff, vbNullChar) - 1)
End If
End Function
Private Sub Command1_Click()
PlayVid "c:windowsclock.avi", Picture1, False
End Sub
Private Sub ClearVid()
If mClearVid Then
mciSendString "close MyVideo", 0&, 0&, 0&
mClearVid = False
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
ClearVid
End Sub
--
Picalausa François
"DAN" a écrit dans le message de news:
430880c4$0$21299$"Jean-Marc" a écrit dans le message de
news: 430830d3$0$10959$"Microsoft Common Controls-2 5.0"
merci bien,cela fonctionne mais il n'accepte pas les fichiers mpg,as tu
une
solution?
du coup il ne sagit plus du controle mci et je n'ai pas acces au
boutons
de controle? coment proceder?
Hello,
Pour le contrôle mci, je n'ai pas réussi à affecter un parent, mais par
les API mci on peut le faire comme ceci:
Option Explicit
Private Declare Function mciGetErrorString _
Lib "winmm.dll" _
Alias "mciGetErrorStringA" _
( _
ByVal fdwError As Long, _
ByVal lpszErrorText As String, _
ByVal cchErrorText As Long _
) _
As Long
Private 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
Private mClearVid As Boolean
Private Sub PlayVid(File As String, PBox As PictureBox, Optional Resize As
Boolean, Optional Async As Boolean = True)
Dim ReturnVal As Long
'Ferme le device si déjà ouvert
ClearVid
'Ouvre le fichier avi
ReturnVal = mciSendString("open " & File & " type avivideo alias
MyVideo parent " & PBox.hWnd & " style child", 0&, 0&, 0&)
If ReturnVal = 0 Then
'Positionne la vidéo à (0,0)-(largeur PBox,hauteur PBox)
If Resize Then
ReturnVal = mciSendString("put MyVideo window at 0 0 " & _
(PBox.ScaleWidth / Screen.TwipsPerPixelX) & " " & _
(PBox.ScaleHeight / Screen.TwipsPerPixelY), 0&, 0&, 0&)
Else
ReturnVal = mciSendString("put MyVideo window at 0 0", 0&, 0&,
0&)
End If
If Async Then
'Retient qu'il faudra fermer la video
mClearVid = True
ReturnVal = mciSendString("play MyVideo", 0&, 0&, 0&)
Else
'Joue la video (bloquant)
ReturnVal = mciSendString("play MyVideo wait", 0&, 0&, 0&)
'Ferme la video
ReturnVal = mciSendString("close MyVideo", 0&, 0&, 0&)
End If
Else
MsgBox ErrorString(ReturnVal)
End If
End Sub
Private Function ErrorString(ErrNum As Long) As String
Dim strBuff As String
Const MCIERR_MAX_LEN = 129
strBuff = String$(MCIERR_MAX_LEN, vbNullChar)
If mciGetErrorString(ErrNum, strBuff, MCIERR_MAX_LEN) Then
ErrorString = Left$(strBuff, InStr(1, strBuff, vbNullChar) - 1)
End If
End Function
Private Sub Command1_Click()
PlayVid "c:windowsclock.avi", Picture1, False
End Sub
Private Sub ClearVid()
If mClearVid Then
mciSendString "close MyVideo", 0&, 0&, 0&
mClearVid = False
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
ClearVid
End Sub
--
Picalausa François
"DAN" <nospam@mediacd.fr> a écrit dans le message de news:
430880c4$0$21299$7a628cd7@news.club-internet.fr...
"Jean-Marc" <NO_SPAM_jean_marc_n2@yahoo.fr> a écrit dans le message de
news: 430830d3$0$10959$ba620e4c@news.skynet.be...
"Microsoft Common Controls-2 5.0"
merci bien,cela fonctionne mais il n'accepte pas les fichiers mpg,as tu
une
solution?
du coup il ne sagit plus du controle mci et je n'ai pas acces au
boutons
de controle? coment proceder?
Hello,
Pour le contrôle mci, je n'ai pas réussi à affecter un parent, mais par
les API mci on peut le faire comme ceci:
Option Explicit
Private Declare Function mciGetErrorString _
Lib "winmm.dll" _
Alias "mciGetErrorStringA" _
( _
ByVal fdwError As Long, _
ByVal lpszErrorText As String, _
ByVal cchErrorText As Long _
) _
As Long
Private 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
Private mClearVid As Boolean
Private Sub PlayVid(File As String, PBox As PictureBox, Optional Resize As
Boolean, Optional Async As Boolean = True)
Dim ReturnVal As Long
'Ferme le device si déjà ouvert
ClearVid
'Ouvre le fichier avi
ReturnVal = mciSendString("open " & File & " type avivideo alias
MyVideo parent " & PBox.hWnd & " style child", 0&, 0&, 0&)
If ReturnVal = 0 Then
'Positionne la vidéo à (0,0)-(largeur PBox,hauteur PBox)
If Resize Then
ReturnVal = mciSendString("put MyVideo window at 0 0 " & _
(PBox.ScaleWidth / Screen.TwipsPerPixelX) & " " & _
(PBox.ScaleHeight / Screen.TwipsPerPixelY), 0&, 0&, 0&)
Else
ReturnVal = mciSendString("put MyVideo window at 0 0", 0&, 0&,
0&)
End If
If Async Then
'Retient qu'il faudra fermer la video
mClearVid = True
ReturnVal = mciSendString("play MyVideo", 0&, 0&, 0&)
Else
'Joue la video (bloquant)
ReturnVal = mciSendString("play MyVideo wait", 0&, 0&, 0&)
'Ferme la video
ReturnVal = mciSendString("close MyVideo", 0&, 0&, 0&)
End If
Else
MsgBox ErrorString(ReturnVal)
End If
End Sub
Private Function ErrorString(ErrNum As Long) As String
Dim strBuff As String
Const MCIERR_MAX_LEN = 129
strBuff = String$(MCIERR_MAX_LEN, vbNullChar)
If mciGetErrorString(ErrNum, strBuff, MCIERR_MAX_LEN) Then
ErrorString = Left$(strBuff, InStr(1, strBuff, vbNullChar) - 1)
End If
End Function
Private Sub Command1_Click()
PlayVid "c:windowsclock.avi", Picture1, False
End Sub
Private Sub ClearVid()
If mClearVid Then
mciSendString "close MyVideo", 0&, 0&, 0&
mClearVid = False
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
ClearVid
End Sub
--
Picalausa François
"DAN" a écrit dans le message de news:
430880c4$0$21299$"Jean-Marc" a écrit dans le message de
news: 430830d3$0$10959$"Microsoft Common Controls-2 5.0"
merci bien,cela fonctionne mais il n'accepte pas les fichiers mpg,as tu
une
solution?
du coup il ne sagit plus du controle mci et je n'ai pas acces au
boutons
de controle? coment proceder?