Window.SetClickThrough - screenshakes/Desktopia GitHub Wiki

Sets wether or not the window ignores clicks.

public void SetClickThrough(bool clickThrough)
{
    ClickThrough = clickThrough;
    uint currentStyle = Windows.GetEXStyle(Handle);
    SetWindowLong(Handle, GWL_EXSTYLE, clickThrough ? currentStyle | WS_EX_LAYERED | WS_EX_TRANSPARENT : currentStyle & ~(WS_EX_LAYERED | WS_EX_TRANSPARENT));
}