Dim lv As LayoutValues
lv = GetDeviceLayoutValues
Select lv.Scale
Case 2
devicetype = "Smartphone 5"
TextSizeRatio = 1.5
Case 1.5
If lv.Width > 1100 Then
devicetype = "Tablet 7"
TextSizeRatio = 2
Else
devicetype = "Smartphone 3.5"
TextSizeRatio = 1
End If
Case 1
If lv.Width > 1100 Then
devicetype = "Tablet 10"
TextSizeRatio = 3
Else If lv.Width < 600 Then
devicetype = "Smartphone 3.5"
TextSizeRatio=1
Else
devicetype = "Tablet 7"
TextSizeRatio = 2
End If
End Select
'then TextSizeRatio to my elements, example:
button1.textsize=14*TestSizeRatio