View Single Post
  #6 (permalink)  
Old 05-16-2009, 09:22 PM
corwin42 corwin42 is offline
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Borchen, Germany
Posts: 432
Send a message via ICQ to corwin42
Awards Showcase
Beta Tester 
Total Awards: 1
Default

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?
Reply With Quote