Jump to content

Putting Windows Media Center in a full screen borderless window


Recommended Posts

As the title says, I would like to make Widnows Center run ins a full size borderless window. A search of the forums indicated I would need _WinAPI_SetWindowLong and

_WinAPI_SetWindowPos.

As a test, I tried just maximizing the window using the code below but I must be missing something obvious. Once I get that working, I need to figure out how to make the window borderless and size to the full size of the monitor anc covering the task bar at the bottom.

$hWnd = WinGetHandle("ehshell.exe")
$iStyle = _WinAPI_GetWindowLong($hWnd, $GWL_STYLE)
$iStyle = BitXOR($iStyle,  $WS_MAXIMIZE)
_WinAPI_SetWindowLong($hWnd, $GWL_STYLE, $WS_MAXIMIZE)
_WinAPI_SetWindowPos($hWnd, $HWND_TOP, 0, 0, 0, 0, BitOR($SWP_FRAMECHANGED, $SWP_NOMOVE, $SWP_NOSIZE))

Appreciate any tips.

Link to comment
Share on other sites

WinSetState("Windows Media Center", "", @SW_MAXIMIZE)

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

i'm confused, what do you mean by true full screen? Because on my computer when I run that I get it in full screen with no borders or taskbar on the monitor it's maximized on. You're going to need to explain what it is you're trying to get if that's not what it's doing for you.

Also, what OS are you running?

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

I am running win7.

Here is the situation. When WMC runs full screen (true full screen) , it writes directly to the graphics card. When running as a window, it wires using more conventional mehtods (I am not sure of the details).

I am trying to use WMC with an application (ARFX) that reads the colors being displayed and adjusts the lighting behind my TV. This applciation won't work correctly when WMC is in Full screen mode by will work if WMC is run in a window. I would like to make WMC run in a window that is borderless and sized so that the window covers the entire screen. Visually it looks like full screen mode but it is acually running in window.

Take Care

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