' screen adjustments
    Dim screensize As Double = GetDeviceLayoutValues.ApproximateScreenSize
    Dim devwidth As Int = GetDeviceLayoutValues.Width/2
    Dim devheight As Int = (GetDeviceLayoutValues.height/2) - 40dip
    If screensize > 8 Then
        Dim devwidth As Int = GetDeviceLayoutValues.Width
        Dim devheight As Int = GetDeviceLayoutValues.height - 80dip
        dicesize = DipToCurrent(devwidth/4)
        pnlmain.Height = DipToCurrent(devheight/2.5)
        pnlsettings.SetLayout(10dip,pnlmain.Height + 10dip,devwidth-20dip,pnlsettings.Height)
        lblresult.SetLayout(DipToCurrent(devwidth/3)-50dip,pnlmain.Height+pnlsettings.Height+20dip,400dip,60dip)
        btnroll.SetLayout(DipToCurrent(devwidth/3),pnlmain.Height+pnlsettings.Height+100dip,300dip,300dip)
    Else
        dicesize = DipToCurrent(devwidth/4)
    End If
    Log("devwidth: " & devwidth)
    Log("devheight: " & devheight)
    Log("dicesize: " & dicesize)
    '