Jump to content
Macro Express Forums

Maximised windows: larger than screen?


Recommended Posts

Are maximised windows in XP always 4 pixels larger than the screen?

 

I've been assuming that there's a bug in my LCD monitor. But the advice I've had from a hardware newsgroup is that this is standard Windows XP. (If so, I'm guessing that's true in Windows 7 also?)

 

In my case, with a 24" Iiyama Prolite E2403WS wide-screen monitor, the screen is set to its recommended size of 1920 x 1200. But for any window I maximise the actual size is reported as 1928 x 1208 and the position is always -4,-4. Always 8 pixels larger in both dimensions, and always offset 4 pixels top left. The rationale suggested is that this is to hide the window edges. If so, I'm just surprised I've never realised that in the last couple of decades! Probably because most of that was using CRT monitors, I suppose.

 

The method I use most to report window size/position is the following simple ME Pro macro (hotkey activated). So, to finally close this issue in my mind, would someone please take a few minutes to run it against their maximised windows (applications, Explorer, whatever) to check the advice I received please.

 

// Display size/position of current window.

Variable Set Integer X: Set to the Current Window's Left

Variable Set Integer Y: Set to the Current Window's Top

Variable Set Integer %WindowWidth%: Set to the Current Window's Width

Variable Set Integer %WindowHeight%: Set to the Current Window's Height

Text Box Display: Window size

 

<COMMENT Value="Display size/position of current window."/>
<VARIABLE SET INTEGER Option="\x09" Destination="X"/>
<VARIABLE SET INTEGER Option="\x08" Destination="Y"/>
<VARIABLE SET INTEGER Option="\x0A" Destination="%WindowWidth%"/>
<VARIABLE SET INTEGER Option="\x0B" Destination="%WindowHeight%"/>
<TEXT BOX DISPLAY Title="Window size" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 X = %X%\r\n\\par Y = %Y%\r\n\\par WindowWidth = %WindowWidth%\r\n\\par WindowHeight = %WindowHeight%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>

 

--

Terry, East Grinstead, UK

DisplayWindowDetails.mex

Link to comment
Share on other sites

I'm running 3 monitors at 1280x1024.

M1 is on the left, M2 is is the middle, M3 is on the right; M2 is my main display.

 

So here are my numbers:
 Monitor      Coordinates              Macro Displays
 M1           -1280, 0: -1  , 1023     x=-1284, y=-4, WW=1288, WH=979
 M2           0    , 0: 1279, 1023     x=-4   , y=-4, WW=1288, WH=980
 M3           1280 , 0: 2559, 1023     x=1276 , y=-4, WW=1288, WH=979

 

The WH discrepancy for M2 is because M2 has the real taskbar, whereas M1 and M3 use Actual Windows Manager's taskbar, which is obviously 1 pixel too short.

 

I believe MEP's window width is wrong - it's 8 pixels too large, though this also goes with the top left x value which always seems 4 pixels too low.

Link to comment
Share on other sites

I confirmed this. It is interesting behavior. On Windows 7 the position of a maximized window is reported as -8, -8. This is because the borders around windows in Windows 7 are wider than Windows XP. I too am surprised that I have never heard of or noticed this behavior but it makes some sense.

 

Macro Express gets the size and position of windows from Windows. It reports exactly what Windows reports.

Link to comment
Share on other sites

Thanks Kevin. That's been bugging me for ages. I've asked several times before in Windows forums and the Nvidia newsgroup. It's only now, in a hardware group, that I got the answer. I'll be interested to see Iiyama Support's reply to my email query!

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Iiyama monitors? Wow, I haven't seen those in a coon's age. Had one a long time ago when a 21" CRT cost $2k! I didn't htink they existed anymore. Maybe they just stopped marketing ot the US.

 

On my W7-64 machine I have dual Viewsonic WSs 1680X1050 and on the extended monitor (no taskbar) I get the following per your macro:

 

X = 1672

Y = -8

WindowWidth = 1696

WindowHeight = 1066

 

When Windows maximizes and application it doesn't disappear the borders. It essentially sizes it so that the borders are off the edge. If I recall I'm reported on this before a long time ago in this forum. So if your window borders are 8 like mine you get these results. But depending on your display environment the border widths can change. EG I'm running AeroGlass on W7 now but I suspect if I changed to one of the dumbed down classic views that would change. Also I believe pragmatically one can vary border width on applications.

 

 

 

 

Link to comment
Share on other sites

 

I believe MEP's window width is wrong - it's 8 pixels too large, though this also goes with the top left x value which always seems 4 pixels too low.

 

Thanks Paul. I think you're wrong about MEP reporting wrongly. Apart from Kevin's confirmation, I just installed Winspector via http://alternativeto.net/software/winspector-spy/ and that too reports all maximised windows as 8 pixels larger than my screen in both dimensions.

 

The visible evidence is the simplest, of course, once you know to look for it!

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...