The hidden title bar and borders causes extra space to show up. I cannot move the window up the screen because it is forced down as a default window behavior to make sure there is a portion of the titlebar still showing.
Using this code
code:
Interop.Call('user32', 'SetWindowLongW', objWindows['SelectArea'].Handle, (-16) /* GWL_STYLE */, Interop.Call('user32', 'GetWindowLongW', objWindows['SelectArea'].Handle, (-16) /* GWL_STYLE */) & ~ 0xC00000 /* WS_CAPTION */ & ~ 0x400000 /* WS_BOARDER */);
We can remove the title bar and the borders however it doesn't act the same as the overlay window doesn't reach the corners of the screen. So therefore dragging at cursor position 0,0 is dragging on the desktop.
Here is the XML for the window.
code:
<?xml version="1.0" encoding="UTF-16"?>
<Interfaces xmlns="urn:msgplus:interface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:msgplus:interface PlusInterface.xsd">
<Window Id="SelectArea" Version="1">
<Attributes>
<ShowInTaskbar>False</ShowInTaskbar>
<TopMost>True</TopMost>
<NoActivate>True</NoActivate>
<LockOnClick>False</LockOnClick>
</Attributes>
<Titlebar>
<AllowMinimize>False</AllowMinimize>
<AllowMaximize>False</AllowMaximize>
<AllowClose>False</AllowClose>
</Titlebar>
<WindowTmpl>
<Corners Shape="Rectangle">
<RoundSize>0</RoundSize>
</Corners>
</WindowTmpl>
<Position Width="400" Height="300" />
</Window>
</Interfaces>