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 Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As Single, ByVal hmodule As Long, ByVal dwflags As Long) As Long
Public MousePoint As POINTAPI
Public Const SND_ASYNC = &H1
Public Type POINTAPI
x As Long
y As Long
End Type
Dim nMove as Integer
Dim bMove as Boolean
Dim nTile as integer
Private Sub Form_Load()
nMove = picBox.Count * 2 'initialize to a value out of range of menu items
nTile = picBox.Count * 2
End Sub
Private Sub picBox_Click(Index As Integer)
PlaySound "Open", 0, SND_ASYNC Or SND_ALIAS
End Sub
Private Sub Timer1_Timer()
Dim i as Integer
Dim xCord as Single
Dim yCord as Single
GetCursorPosition MousePoint
xCord = Mousepoint.x - (Form1.Left / Screen.TwipsPerPixelX + 4) 'add 4 pixels for the border
yCord = MousePoint.y - (Form1.Top / ScreenTwipsPerPixelY + 4) ' add 4 pixels for the border
bMove = false
For i = 0 To picBox.Count * 2
If ((xCord >= picBox(i).Left/ Screen.TwipsPerPixelX) And (xCord <= picBox(i).Left/ Screen.TwipsPerPixelX + picBox(i).Width/ Screen.TwipsPerPixelX) And (yCord >= picBox(i).Top/ Screen.TwipsPerPixelY) And (yCord <= picBox(i).Top/ Screen.TwipsPerPixelY + picBox(i).Height/ Screen.TwipsPerPixelY)) Then
nTile = i
Exit For
Else
nTile = picBox.Count * 2
End If
Next i
If ((nTile <> nMove) And (nMove <> picBox.Count * 2)) Then
picBox(nMove).Picture = LoadPicture("[i][Path to the standard picture here][/i]")
nMove = picBox.Count * 2
End If
If ((nTile <> nMove) And (nTile <> picBox.Count * 2)) Then
picBox(nTile).Picture = LoadPicture("[i][Path to the highlighted picture here][/i]")
nMove = nTile
End If
End Sub