Hey,
I don't think that you can prevent that, it's a Windows behavior.
If you look for a workaround, one solution would be to align your client area to top or the bottom of the form to make sure the gap is not interfering. (Top align is the default behavior)
Or, you draw the whole content by yourself, inclusive the window title bar.
I apologize for not following this - how do I manually align client area to maintain the titlebar height? Can you please elaborate?