I can show an youtube video in a dialog doing this:
Code: Select all | Expand
oWebView = TWebView2():New( oDlg )
oWebView:Navigate("https://youtu.be/3lgXBk-1SoQ")
oWebView:Run()Code: Select all | Expand
oWebView = TWebView2():New( oDlg )
oWebView:Navigate("https://youtu.be/3lgXBk-1SoQ")
oWebView:Run()Code: Select all | Expand
#include "FiveWin.ch"
#define GWL_STYLE -16
#define HWND_TOP 0
#define SWP_NOOWNERZORDER 512
#define SWP_FRAMECHANGED 32
function Main()
local oWebView
oWebView := TWebView2():New()
oWebView:Navigate( "https://www.youtube.com/watch?v=bX0YFNlYowQ" )
setWebView2_fullscreen( oWebView )
oWebView:Run()
return nil
function setWebView2_fullscreen( oWebView )
local hWnd, aScreen, nStyle
if hb_isObject( oWebView )
hWnd := oWebView:GetWindow()
aScreen := FW_GetMonitor( hWnd )
if len( aScreen ) >= 4
nStyle := GetWindowLong( hWnd, GWL_STYLE )
nStyle := nAnd( nStyle, nNot( WS_OVERLAPPEDWINDOW ) )
SetWindowLong( hWnd, GWL_STYLE, nStyle )
SetWindowPos( hWnd, HWND_TOP, aScreen[ 1 ], aScreen[ 2 ], aScreen[ 4 ], aScreen[ 3 ], SWP_NOOWNERZORDER + SWP_FRAMECHANGED )
endif
endif
return nil
Code: Select all | Expand
oWebView = TWebView2():New( Op )
oWebView:Navigate("https://www.youtube.com/embed/3lgXBk-1SoQ")
oWebView:Run()