#include "FiveWin.ch"
function Main()
local oWnd, oActiveX
DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support"
oActiveX = TActiveX():New( oWnd, "WMPlayer.OCX" )
oWnd:oClient = oActiveX // To fill the entire window surface
oActiveX:url = "clapping.wav"
ACTIVATE WINDOW oWnd
return nil
Function PlayVideo()
Private oDlg, oActiveX,aCoors:=GetCoors( FindWindow("Shell_TrayWnd","") )
VideoPath:=AllTrim(UBICACION)+AllTrim(NOMBRE)+'.'+EXT
If !File(VideoPath)
MsgAlert("No existe el video","Lo siento")
Return
Endif
DEFINE DIALOG oDlg TITLE UPPER(NOMBRE) FROM -7,1 TO aCoors[1]-11, aCoors[4] PIXEL;oDlg:lHelpIcon := .F.
oActiveX = TActiveX():New( oDlg,"WMPlayer.OCX" )
ACTIVATE DIALOG oDlg CENTER ON INIT MuestraVIDEO()
oDlg:End()
Return NIL
*
STATIC Function MuestraVIDEO()
oDlg:oClient = oActiveX
oActiveX:url = VideoPath
Return Nil
#include "FiveWin.ch"
function Main()
local oDlg
DEFINE DIALOG oDlg TITLE "FiveWin ActiveX Support"
ACTIVATE DIALOG oDlg ;
ON INIT BuildMPlayer( oDlg )
return nil
function BuildMPlayer( oDlg )
local oActiveX
oActiveX = TActiveX():New( oDlg, "WMPlayer.OCX" )
oDlg:oClient = oActiveX // To fill the entire window surface
oActiveX:Settings:Volume = 7
oActiveX:url = "clapping.wav"
oActiveX:EnableContextMenu()
oDlg:Maximize()
while oActiveX:Playstate != 1
SysRefresh()
end
oDlg:End()
return nil
#include "FiveWin.ch"
static oActiveX
function Main()
local oDlg
DEFINE DIALOG oDlg TITLE "FiveWin ActiveX Support"
ACTIVATE DIALOG oDlg ;
ON INIT BuildMPlayer( oDlg ) ;
VALID ( oActiveX:controls:Stop(), .T. )
return nil
function BuildMPlayer( oDlg )
oActiveX = TActiveX():New( oDlg, "WMPlayer.OCX" )
oDlg:oClient = oActiveX // To fill the entire window surface
oActiveX:Settings:Volume = 7
oDlg:Maximize()
oActiveX:url = "fivewin.avi"
oActiveX:StretchToFit = .T.
oActiveX:EnableContextMenu()
while oActiveX:Playstate != 1
SysRefresh()
end
oDlg:End()
return nil
while oActiveX : Playstate != 1
SysRefresh()
end
MsgInfo( oActiveX : currentmedia:durationString ) // esta línea
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: cmsoft and 50 guests