Jump to content

Windows Media Player Fullscreen


Recommended Posts

Hello,

after a lot of time i spent on this topic without any results, i just want to ask for help.

My problem is very simple. I just want to open Window Media Player with a video and set it to fullscreen.

My first attempt was:

Spoiler
$WMP = ObjCreate("WMPlayer.OCX")
$WMP.OpenPlayer(@ScriptDir & "\Wildlife.wmv")
$WMP.fullscreen = True

 

It opens a player with the video, but doesn't set it to fullscreen.

Excactly like in the next example:

Spoiler
$GUI = GUICreate("Media Player", 500, 200, 215, 10)
$WMP = ObjCreate("WMPlayer.OCX")
$Mediaplayer = GUICtrlCreateObj($WMP, 1, 1, 300, 100)

With $WMP
    .URL = @ScriptDir & "\Wildlife.wmv"
    .windowlessVideo = False
    .enableContextMenu = True
    .enabled = True
    .uiMode = "full"
    .settings.autostart = True
    .settings.mute = False
    .settings.volume = 100
    .settings.Balance = 0
    .fullScreen = True
EndWith
GUISetState(@SW_SHOW, $GUI)

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

 

I hope somebody can help me :)

Thanks.

Greetings

 

Link to comment
Share on other sites

  • Moderators

@SchimmelJoghurt what about just a shellexecute?

ShellExecute("wmplayer.exe", "", "", Default, @SW_MAXIMIZE)

You can then use ObjGet to get a ref to the WMPlayer object if you need to manipulate it further.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Your GUI is too small:

After adding this at the top of your script

#include <GUIConstantsEx.au3>

I have changed the first line as below

$GUI = GUICreate("Media Player", @DesktopWidth-50, @DesktopHeight-50,20,20)

and it worked for me.

Have fun !


 

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