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.
Private Sub Form_Load()
Dim oldmode As Long
oldmode = Form1.ScaleMode
Form1.ScaleMode = vbPixels
Label1.BackStyle = 1 'opaque
Label1.BackColor = vbRed
Label1.BorderStyle = 0 ' None
Label1.Move Frame1.Left - 1, Frame1.Top - 1, Frame1.Width + 2, Frame1.Height + 2
Label1.ZOrder 0 ' Send to back
Form1.ScaleMode = oldmode
End Sub
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As Long
Private Declare Function Rectangle Lib "gdi32" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Sub DrawFrameBorder()
Dim oldcolor As Long
Dim oldmode As Long
Dim hdc As Long
oldmode = Form1.ScaleMode
oldcolour = Form1.ForeColor
hdc = GetDC(Me.hwnd) ' Get device context
Form1.ForeColor = vbRed
Rectangle hdc, Frame1.Left - 1, Frame1.Top - 1, Frame1.Left + Frame1.Width + 2, Frame1.Top + Frame1.Height + 3
ReleaseDC Me.hwnd, hdc ' Release device context
Form1.ForeColor = oldcolour
Form1.ScaleMode = oldmode
End Sub
Private Sub Form_Paint()
DrawFrameBorder
End Sub