Jump to content
Sign in to follow this  
BurakSZ

Windows Media Player without Video into GUI

Recommended Posts

BurakSZ

Hey Guys,

I want to put a Windows Media Player into a GUI. My Script:

#include <GUIConstants.au3>
$gui = GUICreate("",250,255)
$oMP = ObjCreate("WMPlayer.OCX")
$mediaplayer = GUICtrlCreateObj($oMP, 5, 5, 300, 300)
GUISetState(@SW_SHOW)
With $oMP
    .fullScreen = True
    .windowlessVideo = False
    .enableContextMenu = True
    .enabled = True
    .uiMode = "full"
    .settings.autostart = True
    .settings.mute = False
    .settings.volume = 100
    .settings.Balance = 0
    .URL = "http://blackbeats.fm/listen.asx"
EndWith

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

You see that I have a video. How do I delete that video, so I just have Play, Stop, ... ? I don't know the command for it I searched for it and it told me to set the heigth to 40, but this just shows me a black window there...

Greets

BurakSZ

Windows Media Player.au3

Share this post


Link to post
Share on other sites
ajit

Try this

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
    

    
    $hGUI = GUICreate("Media Player", 300, 100, 215, 10, Default, Default)
    GUISwitch($hGUI)
    $h_cGUI = GUICreate("Embed Player", 242, 41, 20, 20, $WS_CHILD, "", $hGUI )
        
    $oMP = ObjCreate("WMPlayer.OCX")
    $mediaplayer = GUICtrlCreateObj($oMP, 0, -200 , 600, 385)

With $oMP
    .fullScreen = True
    .windowlessVideo = False
    .enableContextMenu = True
    .enabled = True
    .uiMode = "full"
    .settings.autostart = True
    .settings.mute = False
    .settings.volume = 100
    .settings.Balance = 0
    .URL = "http://blackbeats.fm/listen.asx"
EndWith

GUISetState(@SW_SHOW, $hGUI)
GUISetState(@SW_SHOW, $h_cGUI)

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites
BurakSZ

Thanks works! Can be closed...

Share this post


Link to post
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
Sign in to follow this  

×