Jump to content

[HELP] Winmedia with Group, Tab...


Recommended Posts

Here's my code:

#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????

Link to comment
Share on other sites

#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.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...