Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Minus <em>only</em> the taskbar? That might not really be what you want. There can be other windows on the edges of the screen that are meant to "carve out" regions of the desktop. Also, note that sometimes the <em>height</em> of the taskbar is irrelevant, such as when it's docked to the left or right side of the screen.</p> <p>Galwegian has shown how to get the height of the taskbar, but if you're really looking for the usable area of the desktop, use the <a href="http://msdn.microsoft.com/en-us/library/ms724947.aspx" rel="nofollow noreferrer"><code>SystemParametersInfo</code></a> function with the <code>spi_GetWorkArea</code> flag instead. It will tell you the area of the desktop excluding all desktop toolbars. MSDN advises that if you're interested in the space available on something other than the primary monitor, you should call <a href="http://msdn.microsoft.com/en-us/library/ms534599.aspx" rel="nofollow noreferrer"><code>GetMonitorInfo</code></a> instead; it fills a record, and one of the fields is for the monitor's work area.</p> <p>I'm going to second the idea that you might really just want to maximize your window. If you've already done that, and you want to know how much space you're taking up, then get the current size of your window, and then subtract the dimensions of your window's frame (which get "tucked under the edges" of the desktop when a window is maximized). You can use <a href="http://msdn.microsoft.com/en-us/library/ms724385.aspx" rel="nofollow noreferrer"><code>GetSystemMetrics</code></a> with the <code>sm_CXFrame</code> and <code>sm_CYFrame</code> flags for that.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload