Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Option Explicit
Private Enum MVArgs
MVLEFT
MVTOP
MVWIDTH
MVHEIGHT
End Enum
Private Sub Form_Load()
Dim oCtrl As Control
ScaleHeight = 100
ScaleWidth = 100
For Each oCtrl In Controls
With oCtrl
.Tag = .Left & ", " & .Top & ", " & .Width & ", " & .Height
End With
Next oCtrl
End Sub
Private Sub Form_Resize()
Dim oCtrl As Control
Dim sVals() As String
Dim nSW As Long
Dim nSH As Long
nSW = ScaleWidth
nSH = ScaleHeight
If WindowState = vbMinimized Then Exit Sub
For Each oCtrl In Controls
sVals = Split(oCtrl.Tag, ", ")
oCtrl.Move Val(sVals(MVLEFT)) * nSW / 100, _
Val(sVals(MVTOP)) * nSH / 100, _
Val(sVals(MVWIDTH)) * nSW / 100, _
Val(sVals(MVHEIGHT)) * nSH / 100
Next oCtrl
End Sub