Jump to content

Object + gui


nend
 Share

Recommended Posts

Global $oMediaplayer

_Startobject()

$oMediaplayer.URL = "http://www.garnierstreamingmedia.com/asx/streamerswitch.asp?stream=205"
$oMediaplayer.controls.play()

GUICreate("test")
GUICtrlCreateObj($oMediaplayer, 10, 10, 300, 300)
$oMediaplayer.UImode = "none"
GUISetState(@SW_SHOW)

while 1
    $msg = GUIGetMsg()
    If $msg = -3 Then
        GUIDelete()
    EndIf

    Sleep(20)
WEnd

Func _Startobject()
    $oMediaplayer = ObjCreate("WMPlayer.OCX.7")
    If Not IsObj($oMediaplayer) Then
        MsgBox(8192, "test", "quit!")
        Exit
    EndIf
    $oMediaplayer.Enabled = True
    $oMediaplayer.WindowlessVideo = false
    $oMediaplayer.UImode = "none"
    $oMediaplayer.enableContextMenu = False
    $oMediaPlayControl = $oMediaplayer.Controls
    $oMediaPlaySettings = $oMediaplayer.Settings
    $oMediaPlaySettings.Volume = 100
EndFunc
This is a peace of code from a much larger project.

The problem that when I delete the gui my object stops as well.

Is there a way to use these object and start GUICtrlCreateObj and then delete the window whitout stopping the mediaplayer object?

In this project I can't use the option "GUISetState(@SW_HIDE, $fullscreengui)"

Edited by nend
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...