#include #include #include #include #include _Example(@ScriptDir & "\Voorbeeld.mp4") ; File name of media! ; example Func _Example($sFileName) Local $hForm, $aiCliSize, $iCtrlID ;$hForm = GUICreate("MediaPlayer_Embedded!", 640, 480, -1, -1, BitOR($WS_POPUP, $WS_SIZEBOX), BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)) ;$aiCliSize = WinGetClientSize($hForm) ;$iCtrlID = _MediaPlayerEmbeded($sFileName, -2, -2, 640, 490) ;GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST") ; Or $hForm = GUICreate("MediaPlayer_Embedded!", 600, 253, -1, -1, $WS_SIZEBOX) $aiCliSize = WinGetClientSize($hForm) GUISetState(@SW_SHOW) $iCtrlID = _MediaPlayerEmbeded($sFileName, -1, -1, 600, 200) GUISetState() ;Sleep(2000) ;GUICtrlSetState($iCtrlID, $GUI_HIDE) ;Sleep(2000) ;GUICtrlSetState($iCtrlID, $GUI_SHOW) ; Run the GUI until the dialog is closed While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc ;==>_Example ; #FUNCTION# ==================================================================================================================== ; Name ..........: _MediaPlayerEmbeded ; Description ...: ; Syntax ........: _MediaPlayerEmbeded( $sFileName, $iLeft, $iTop, $iWidth, $iHeight ) ; Parameters ....: $sFileName - A string value. ; $iLeft - An integer value. ; $iTop - An integer value. ; $iWidth - An integer value. ; $iHeight - An integer value. ; Return values .: None ; Author ........: JScript ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: _MediaPlayerEmbeded($sFileName, $iLeft, $iTop, $iWidth, $iHeight) ; =============================================================================================================================== Func _MediaPlayerEmbeded($sFileName, $iLeft, $iTop, $iWidth, $iHeight) Local $oShell, $sInnerHTML, $iCtrlID $sInnerHTML = ' ' & _ ' ' & _ ' ' & _ ' ' & _ ' ' & _ ' ' & _ ' ' & _ ' ' $oShell = ObjCreate("Shell.Explorer") $iCtrlID = GUICtrlCreateObj($oShell, $iLeft, $iTop, $iWidth, $iHeight) $oShell.navigate("about:blank") While $oShell.Busy() Sleep(10) WEnd With $oShell.document .write('') .write('') .body.innerHTML = $sInnerHTML .body.topmargin = 0 .body.leftmargin = 0 .body.scroll = "no" .body.bgcolor = 0x000000 .body.style.borderWidth = 0 EndWith Return $iCtrlID EndFunc ;==>_MediaPlayerEmbeded Func WM_NCHITTEST($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam, $lParam Local $iDef = _WinAPI_DefWindowProc($hWnd, $iMsg, $wParam, $lParam) Switch $iDef Case $HTSYSMENU, $HTBOTTOM, $HTBOTTOMLEFT, $HTBOTTOMRIGHT, $HTLEFT, $HTRIGHT, $HTTOP, $HTTOPLEFT, $HTTOPRIGHT Return $HTCAPTION; -1 to not moving! EndSwitch Return $iDef EndFunc ;==>WM_NCHITTEST