Date: 05.05.15 - 2:41am
I have always used the Windows classic theme, the XP theme stupid wide title bars. They've been carried through to Windows 7, and now Windows 8. In Windows 8 Windows the classic theme is gone so now I really have to deal with it :-\
If you are a developer writing form resize code.. The height of the title bar plays into calculations.
I haven't found a way to programmatically reset it yet. There is probably a way through subclassing, however I'm not going to subclass every single window that I open just for this.
Until then you can at least detect it and account for it. I think this applies to normal windows only, looks wrong for fixed tool windows
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long Property Get TitleBarHeight(f As Form) As Long Const SM_CYCAPTION = 4 TitleBarHeight = GetSystemMetrics(SM_CYCAPTION) 'pixels If f.ScaleMode = ScaleModeConstants.vbTwips Then TitleBarHeight = f.ScaleY(TitleBarHeight, vbPixels, vbTwips) End If End Property