NewBieAuto Posted February 20, 2018 Posted February 20, 2018 Here's my code: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $PathMp3 = "D:\ENTERTAIMENT\MUSIC\Newest Music\Test.mp3" $hGUI = GUICreate("Media Player", 1050, 650, 215, 10, Default, Default) GUISwitch($hGUI) $h_cGUI = GUICreate("Embed Player", 340, 245, 20, 20, $WS_CHILD, -1, $hGUI ) $oMP = ObjCreate("WMPlayer.OCX") $mediaplayer = GUICtrlCreateObj($oMP, 0, -200 , 240, 245) GUICtrlCreateTab(1, 1, 900, 300) GUICtrlCreateTabItem('TAB 1') GUICtrlCreateGroup('TEST', 1, 1, 300, 200) GUICtrlCreateTabItem(""); With $oMP .fullScreen = True .windowlessVideo = False .enableContextMenu = True .enabled = True .uiMode = "full" .settings.autostart = False .settings.mute = False .settings.volume = 100 .settings.Balance = 0 .URL = $PathMp3 EndWith GUISetState(@SW_SHOW, $hGUI) GUISetState(@SW_SHOW, $h_cGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd But I dont know how to make windows media appear inside the Group TEST. Could anyone help me????
Subz Posted February 20, 2018 Posted February 20, 2018 What do you mean, just add the GuiCtrlCreateObj after GUICtrlCreateGroup and resize accordingly. You should also add GUICtrlCreateGroup("", -99, -99, 1, 1) to close the Group control.
NewBieAuto Posted February 20, 2018 Author Posted February 20, 2018 expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $PathMp3 = "D:\ENTERTAIMENT\MUSIC\Newest Music\Test.mp3" $hGUI = GUICreate("Media Player", 1050, 650, 215, 10, Default, Default) GUICtrlCreateTab(1, 1, 900, 300) GUICtrlCreateTabItem('TAB 1') _CreateMediaGuiWithVideo('Test1', $PathMp3, 20, 20) _CreateMediaGuiWithVideo('Test2', $PathMp3, 300, 20) GUICtrlCreateGroup("", -99, -99, 1, 1) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _CreateMediaGuiWithVideo($String, $PathMp3, $Left, $Top) GUICtrlCreateGroup($String, $Left, $Top, 200, 200) $h_cGUI = GUICreate("Embed Player", 240, 245, $Left +10, $Top + 10, $WS_CHILD ) $oMP = ObjCreate("WMPlayer.OCX") $mediaplayer = GUICtrlCreateObj($oMP, $Left + 20, $Top + 20 , 240, 245) With $oMP .fullScreen = True .windowlessVideo = False .enableContextMenu = True .enabled = True .uiMode = "mini" .settings.autostart = False .settings.mute = False .settings.volume = 100 .settings.Balance = 0 .URL = $PathMp3 EndWith GUISetState(@SW_SHOW, $h_cGUI) EndFunc Here's my new code. But how to delete black screen on the media windows.
Au3Builder Posted February 20, 2018 Posted February 20, 2018 (edited) .uiMode = "invisible" - hides the WMP window. $oMP.controls.play() - plays music $oMP.controls.pause() - pause music you can create custom buttons. Edited February 20, 2018 by Au3Builder
NewBieAuto Posted February 21, 2018 Author Posted February 21, 2018 @Au3Builder But I dont want to hide the controls window. If change to 'invisible', it hides all
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