It seems that hardware.SIPHeight does not scale correctly in AutoScale applications.
I want to size a panel the same height as the area which is not overlapped by the SIP. I used the folllowing code to calculate the height (fMain is my form, pMain is my panel, hw is a hardware object):
Code:
If hw.SIPEnabled Then
FormHeight = fMain.Height - hw.SIPHeight
Else
FormHeight = fMain.Height
End If
pMain.Height=FormHeight
pMain.Width=fMain.Width
On a QVGA device it works well. On a VGA device the SIPHeight is substracted twice from the FormHeight so the panel is too small.
I have to use
Code:
FormHeight = fMain.Height - (hw.SIPHeight / screenScaleY)
to get the correct height for the panel.
Greetings,
Markus
@agraham: Is the AutoScale aware library of ControlsExDevice available somewhere?