Private Sub Form_Load()
WebBrowser1.Navigate2 "http://www.teamliquid.net/video/userstream.php?user=ToT%20Livestream"
WebBrowser1.Visible = False
Timer1.Interval = 5000
End Sub
Private Function WebPageContains(ByVal s As String) As Boolean
Dim i As Long, EHTML
For i = 1 To WebBrowser1.Document.All.length
Set EHTML = WebBrowser1.Document.All.Item(i)
If Not (EHTML Is Nothing) Then
If InStr(1, EHTML.innerHTML, s, vbTextCompare) > 0 Then
WebPageContains = True
Exit Function
End If
End If
Next i
End Function
Private Sub Timer1_Timer()
Dim strfindword As String
strfindword = "(Online)"
If WebPageContains(strfindword) = True Then
Image1.Picture = LoadPicture("c:\Online.jpg")
Else
Image1.Picture = LoadPicture("c:\Offline.jpg")
MsgBox "No "
End If
End Sub