Sign in to follow this  
Followers 0
SchimmelJoghurt

Windows Media Player Fullscreen

3 posts in this topic

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

 

Share this post


Link to post
Share on other sites



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


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
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 !


 

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  
Followers 0