ajit Posted February 25, 2010 Share Posted February 25, 2010 expandcollapse popup; Author: Kåre Johansson ; Description: Very Simple example: Embedding "WMPlayer.OCX.7" => "wmp.dll" Latest rev, 11 ; Date: 2.9.07 ; The application automatically grows/shrinks to fit the specified object width and height, although ; the video itself will not automatically grow beyond 100%. #include <GUIConstants.au3> ;#include <words.au3> Global $oRP = ObjCreate("WMPlayer.OCX.7") If Not IsObj($oRP) Then; check component MsgBox(48,"ERROR...","object failed") Exit EndIf #cs Global $colCDROMs = $oRP.cdromCollection; DVD collection function if $colCDROMs.Count >= 1 then For $i = 0 to $colCDROMs.Count - 1 $colCDROMs.Item($i).Eject Next EndIf #ce Local $WS_OVERLAPPEDWINDOW,$WS_VISIBLE,$WS_CLIPSIBLINGS, $SS_CENTER $GUI = GUICreate ("Embedded Medieplayer control Test", 570, 500, -1, -1,BitOr($WS_OVERLAPPEDWINDOW,$WS_VISIBLE,$WS_CLIPSIBLINGS)) ;Guisetbkcolor(0, $GUI ) $TagsPageC = GuiCtrlCreateLabel('Visit Commands Page', 5, 405, 150, 15, $SS_CENTER) GuiCtrlSetFont(-1,9,400,4) GuiCtrlSetColor(-1,0x0000ff) GuiCtrlSetCursor(-1,0) Global $GUIActiveX = GUICtrlCreateObj( $oRP, 10, 10 , 600 , 385 ) Global $oRPEvt = ObjEvent($oRP,"MediaPlayer_") With $oRP; Object tag pool .fullScreen = True .windowlessVideo = True .stretchToFit = True .URL = "C:\Documents and Settings\user\Desktop\Test.wav" ;"Test.wmv"; example: 'g:\Video\Madrid.wmv' .enableContextMenu = True ;.enabled = False .Controls.currentPosition = 0; move to location in movie If .controls.isAvailable("fastForward") Then .controls.fastForward If .controls.isAvailable("fastReverse") Then .controls.fastReverse ;.Controls.Play ;/ pause and Stop ;.Controls.Pause ;/ pause and Stop .Controls.Stop;/ pause and Stop .uiMode = "Full"; none / mini full ;.uiMode = "invisible"; to make invisible .settings.autostart = True .settings.mute = False .settings.volume = 50; 0 - 100 .settings.Balance = 0; -100 to 100 EndWith GUISetState();Show GUI While 1 $msg = GUIGetMsg() Consolewrite($oRP.controls.currentPosition & @CRLF); display current position in movie Consolewrite($oRP.currentMedia.duration & @CRLF); duration of movie Consolewrite($oRP.controls.currentPositionString & @CRLF); Returns HH:MM:SS Consolewrite($oRP.currentMedia.durationString & @CRLF); Returns HH:MM:SS Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $TagsPageC Run(@ComSpec & ' /c start http://www.myplugins.info/guids/typeinfo/typeinfo.php?clsid={6BF52A52-394A-11d3-B153-00C04F79FAA6}','', @SW_HIDE) EndSelect WEnd GUIDelete () $oRP = 0; Free the compoment Exit ; Event function tricks when double click the mouse Func MediaPlayer_DoubleClick($Button, $ShiftState, $fX, $fY) ;MediaPlayer_Click If $oRP.playState = 3 Then $oRP.Controls.Pause; pause Else With $oRP .Controls.Play; Play If .settings.IsAvailable('Rate') Then .settings.rate = 1; check settings and speedup movie if this is an option ;.Controls.currentPosition = 60 EndWith Endif EndFuncHi:This is a script from the forum which uses ObjCreate("WMPlayer.OCX.7")No matter what I do I cannot increase the size of the player in my GUI. Is it not possible to increase its size.Another question is whether it is possible to hide the video or visualization window and show only the controls. Link to uiMode property My linkPlease help me someoneRegardsAjit Link to comment Share on other sites More sharing options...
ajit Posted February 27, 2010 Author Share Posted February 27, 2010 I assume by now it is not possible. Ajit Link to comment Share on other sites More sharing options...
bogQ Posted February 27, 2010 Share Posted February 27, 2010 (edited) just a thought, first try to start some movie before you try to change size of the screenThere is one nice example on WMP that maby can help youWindows Media Player udf Edited February 27, 2010 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. 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