dantay9 Posted May 22, 2009 Share Posted May 22, 2009 (edited) I have IE embeded into a window so I can play the matrix as the background for my gui. I have it working, except I can't get the context menu on the windows media player to go away. Also, why can't I click on the button that I made after the object and whenever I move the window, the button disappears. Why??? expandcollapse popup#include <IE.au3> #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> Global $oIE = _IECreateEmbedded() $s_PlayerObjId = "wmplayerID" ;~ $videoPath = FileOpenDialog("Choose a video file", @MyDocumentsDir, "Videos (*.avi;*.mpeg;*.mpg;*.wmv)", 3) $gui = GUICreate("", 600, 450) GUISetState() $o_Plyr = playVideo($oIE, "wmplayerID", @DesktopDir & "\dreamscene-matrix.wmv", -32, -50, 800, 550) Sleep(1500) $pos = WinGetClientSize($gui) $w = $pos[0] $h = $pos[1] $Test = GUICtrlCreateButton("Test", 50, 50, 150, 50) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop Case $Test MsgBox(0, '', "Test") EndSwitch Sleep(10) WEnd $oIE = 0 Func playVideo(ByRef $oIE, $s_PlayerObjId, $vid, $i_Left, $i_Top, $i_Width, $i_Height) Local $blank, $oDoc, $oBody, $oBodyStyle, $IEReadyState, $o_Plyr $oCtrl = GUICtrlCreateObj($oIE, $i_Left, $i_Top, $i_Width, $i_Height) _IENavigate($oIE, "about:blank", 1) _IELoadWait($oIE, 180, 4000) Do Sleep(50) $oDoc = $oIE.document Until IsObj($oDoc) Sleep(25) $oBody = $oDoc.body $oBody.scroll = "no" $oBodyStyle = $oBody.style $oBodyStyle.margin = "0px" $oBodyStyle.border = "0px" $oBodyStyle.padding = "0px" $oBodyStyle.background = "#000000" $o_Plyr = $oDoc.createElement("OBJECT") With $o_Plyr .id = $s_PlayerObjId .style.margin = "0px" .style.border = "0px" .style.padding = "0px" .style.width = $i_Width .style.height = $i_Height ;~ .enableContextMenu = "false"; Isn't this how to stop context menu??? .classid = "CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" .uiMode = "none"; invisible, none, mini, full .StretchToFit = True .settings.setMode("loop", "true") .settings.rate = 1 .URL = $vid EndWith $oBody.appendChild($o_Plyr) Return $o_Plyr EndFunc ;==>playVideo Edited May 23, 2009 by dantay9 Link to comment Share on other sites More sharing options...
dantay9 Posted May 23, 2009 Author Share Posted May 23, 2009 *BUMP* Is anyone confused about what I want? Link to comment Share on other sites More sharing options...
Authenticity Posted May 23, 2009 Share Posted May 23, 2009 You can use WMPlayer.OCX.7 which is available to WMP10 and up, I think. It exposes quite the same functionality, including the .EnableContextMenu , .uiMode, .Settings, etc.. but I don't see how it'll be possible to use it as the background of your GUI to put controls on it. Link to comment Share on other sites More sharing options...
dantay9 Posted May 23, 2009 Author Share Posted May 23, 2009 Thanks for your reply. I didn't think it was really possible either. Thanks for confirming that. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now