delta = ((100%x + 100%y) / (320dip + 480dip) - 1)
rate = 0.5 'value between 0 to 1.
scale = 1 + rate * delta
txtMainBanner.SetLeftAndRight(0, 100%x)
txtMainBanner.Top = 0
txtMainBanner.Height = txtMainBanner.Height * scale
'only the height is scaled with the scale formula.
btnSpeech.SetTopAndBottom(100%y - btnSpeech.Height * scale, 100%y)
btnSpeech.SetLeftAndRight(0, 33%x)
btnMainSettings.SetTopAndBottom(btnSpeech.Top, btnSpeech.Bottom)
btnMainSettings.SetLeftAndRight(66%x, 100%x)
btnMainPlay.SetLeftAndRight(0, btnSpeech.Right)
btnMainPlay.SetTopAndBottom(btnSpeech.Top - btnSpeech.Height, btnSpeech.Top)
btnMainModify.SetTopAndBottom(btnMainPlay.Top, btnMainPlay.Bottom)
btnMainModify.SetLeftAndRight(33%x, 66%x)
btnMainMedia.SetTopAndBottom(btnMainPlay.Top, btnMainPlay.Bottom)
btnMainMedia.SetLeftAndRight(66%x, 100%x)
btnSpeech.TextSize = btnSpeech.TextSize * scale
btnMainMedia.TextSize = btnSpeech.TextSize
btnMainModify.TextSize = btnSpeech.TextSize
btnMainPlay.TextSize = btnSpeech.TextSize
btnMainSettings.TextSize = btnSpeech.TextSize
txtMainStory.SetTopAndBottom(txtMainBanner.Bottom, btnMainPlay.Top)
txtMainStory.SetLeftAndRight(0, 100%x)
txtMainStory.TextSize = txtMainStory.TextSize * scale