FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour open a video in a dialog box?
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM

open a video in a dialog box?

Posted: Sat Feb 20, 2010 05:49 AM

Is it possible to open a video in a separate dialog.
I want to an open a demo of my app in a dialog when opening the app.

Can it be done and if so how?

Thanks.

Thank you

Harvey
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: open a video in a dialog box?

Posted: Sat Feb 20, 2010 08:52 AM

Did you try DEFINE VIDEO command?

EMG

Posts: 408
Joined: Fri Jan 29, 2010 08:14 PM

Re: open a video in a dialog box?

Posted: Mon Feb 22, 2010 04:36 AM

Hag:

Usa ActiveX y olvidate de mil problemas, ademas con windows 7 puedes ver todo tipo de formatos de video con esta funcion, sin necesidad de programar nada. Ahora con Windows 7 tambien reproduce .MOV ( quikTime ), FLV ( ficheros YouTube ).

Este es un ejemplo con DIALOG:

/------------------------------------------------------------------------------/
STATIC Function MostrarWMP( cFile, cTitle )
/------------------------------------------------------------------------------/

/ Funcion ActiveX para visualizar el WMP ( Windows Media Player ) dentro de un Dialogo. /

LOCAL oDlg, oActiveX

DEFINE DIALOG oDlg TITLE cTitle FROM 1,1 TO 300,580 PIXEL

  oDlg:lHelpIcon := .F.

ACTIVATE DIALOG oDlg CENTERED;
ON INIT ( oActiveX := ActivaWMP( oDlg, oActiveX, cFile ) );
VALID ( oActiveX:DO( "Stop" ), oActiveX:End(), .T. )

Return NIL
/------------------------------------------------------------------------------/
STATIC Function ActivaWMP( oDlg, oActiveX, cFile )
/------------------------------------------------------------------------------/

oActiveX = TActiveX():New( oDlg, "MediaPlayer.MediaPlayer.1",;
oDlg:nTop, oDlg:nLeft, oDlg:nRight, oDlg:nBottom )

oActiveX:SetProp( "FileName", cFile )

Return( oActiveX )

Un saludo
JLL

Libreria: FWH/FWH1109 + Harbour 5.8.2 + Borland C++ 5.8.2
Editor de Recursos: PellecC
ADA, OURXDBU
S.O: XP / Win 7 /Win10
Blog: http://javierlloris.blogspot.com.es/
e-mail: javierllorisprogramador@gmail.com
Posts: 603
Joined: Sun May 04, 2008 08:44 PM

Re: open a video in a dialog box?

Posted: Mon Feb 22, 2010 07:29 AM

Using this mode, if u resize window video resize too.

STATIC Function ActivaWMP( oDlg, cFile )
Local oAct:=TActiveX():New( oDlg, "MediaPlayer.MediaPlayer.1")
oAct:SetProp( "FileName", cFile )
oDlg:oClient:=oAct
Return oAct

Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM

Re: open a video in a dialog box?

Posted: Mon Feb 22, 2010 03:53 PM

Thank you all for the help. I'll be trying some of the suggestions.

Thank you

Harvey
Posts: 603
Joined: Sun May 04, 2008 08:44 PM

Re: open a video in a dialog box?

Posted: Mon Feb 22, 2010 04:36 PM

Other sample:

include "Fivewin.ch"

static oWnd, oAct

Function main()

define window ownd
wmp("arquivo.mp4")
activate window ownd

Return nil

function wmp( cFile )

oAct:=TActiveX():New( oWnd, "MediaPlayer.MediaPlayer.1")
oAct:SetProp( "FileName", cFile )
oWnd:oClient:=oAct

Return

Continue the discussion