hi,
i try to use VLC Player under FiveWin
- Code: Select all Expand view RUN
#include "fivewin.ch"
PROCEDURE Main()
LOCAL oIcon, oVLCX, oWnd
DEFINE WINDOW oWnd FROM 0, 0 TO 600, 800 TITLE "MyPlayer" PIXEL
@ 0, 0 ACTIVEX oVLCX OF oWnd PROGID "VideoLAN.VLCPlugin.2" SIZE 640, 480
oVLCX:bOnEvent := { |event, aParams, pParams| OnEvent( event, aParams, pParams ) }
* oWnd:oClient := oVLCX // fill Window
@ 010, 650 BUTTON "load" OF oWnd SIZE 80, 48 PIXEL ACTION LoadFile(oVLCX)
ACTIVATE WINDOW oWnd CENTER
oVLCX:End()
oWnd:End()
RETURN
FUNCTION LoadFile(oVLCX)
LOCAL cFileName := cGetFile( "Video |*.mp4|Musica |*.mp3", "Selecione medio", nil, "", .f., .t. )
LOCAL oControl
LOCAL oplaylist
LOCAL oVideo
IF hb_isObject( oVLCX )
oControl := oVLCX
oplaylist := oControl:playlist
oVideo := oControl:Video
oControl:Toolbar := .T.
oControl:volume := 50
oControl:FullscreenEnabled := .T.
oplaylist:items:clear()
oplaylist:add( "File:///" + cFileName )
oplaylist:playitem(0)
* oVideo:fullscreen := .T.
ELSE
MsgInfo("no Object")
ENDIF
RETURN nil
PROCEDURE OnEvent( cEvent, aParams, pParams )
do case
case cEvent == "MediaPlayerNothingSpecial"
case cEvent == "MediaPlayerOpening"
case cEvent == "MediaPlayerBuffering"
case cEvent == "MediaPlayerPlaying"
case cEvent == "MediaPlayerPaused"
case cEvent == "MediaPlayerForward"
case cEvent == "MediaPlayerBackward"
case cEvent == "MediaPlayerEncounteredError"
case cEvent == "MediaPlayerEndReached"
MsgInfo("MediaPlayerEndReached")
case cEvent == "MediaPlayerStopped"
case cEvent == "MediaPlayerStopAsyncDone"
case cEvent == "MediaPlayerTimeChanged"
case cEvent == "MediaPlayerPositionChanged"
case cEvent == "MediaPlayerSeekableChanged"
case cEvent == "MediaPlayerPausableChanged"
case cEvent == "MediaPlayerMediaChanged"
case cEvent == "MediaPlayerTitleChanged"
case cEvent == "MediaPlayerLengthChanged"
case cEvent == "MediaPlayerChapterChanged"
case cEvent == "MediaPlayerVout"
case cEvent == "MediaPlayerMuted"
case cEvent == "MediaPlayerUnmuted"
case cEvent == "MediaPlayerAudioVolume"
case cEvent == "Click"
case cEvent == "DblClick"
MsgInfo("DblClick " + VAR2CHAR(aParams),VAR2CHAR(pParams))
case cEvent == "KeyDown"
MsgInfo("KeyDown " + VAR2CHAR(aParams),VAR2CHAR(pParams))
case cEvent == "KeyPress"
MsgInfo("KeyPress " + VAR2CHAR(aParams),VAR2CHAR(pParams))
case cEvent == "KeyUp"
case cEvent == "MouseDown"
case cEvent == "MouseMove"
case cEvent == "MouseUp"
endcase
RETURN
FUNCTION VAR2CHAR( cIn )
LOCAL cOut := hb_valToExp( cIn )
RETURN STRTRAN( cOut, '"', '' )
that work so far and i can load / play Video
but VLC ActiveX does not react on DblClick to go "FullScreen"
it does work under Xbase++ and harbour HMG / Extended Version
---
VLC have Event Dblclick but "Fullscreen" IHMO does not need that Event under Xbase++ or harbour HMG
it also does not react on VLC ALT + F to switch "Fullscreen" under FiveWin
i have "test" Event
it does "react" when oWnd have Focus and VLC is NOT playing
as soon VLC play (Directshow Overlay) i do not get Dblclick Event ...
so what is Different in FiveWin