Question Created Website monitor program, can't check status of page loading HELP!!

b4045359

New member
Joined
Jun 14, 2011
Messages
1
Programming Experience
10+
Intended use of program:
1. User enters 1-3 websites they wish to monitor
2. User clicks go next to textbox with data entered, then button and a copy of form refered to as browse is created.
3. Form refered to as browse is directed to the url refered to on the form refered to as monitor, in the associated textbox(passed as a parameter to copyForm)
4. A timer is used to refresh the webpage every 10 seconds

What I wanted to happen was the program turn the associated picturebox in form1 green if page is loaded, and black is loading.


What manager form looks like:
manager.png


The code I have used is below:


Public Class Form1
Dim iNPUTaDDRESS(3) As String
Public Sub CopyFORM(ByVal NUM As String, ByVal Hey As PictureBox)

Dim f As Browse

f = New Browse
f.Name = "Monitoring Website"
f.Text = f.Name
f.Address1.Text = NUM
Call f.Start_Click_1()

f.Show()




End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
iNPUTaDDRESS(1) = Address1.Text
iNPUTaDDRESS(2) = Address2.Text
iNPUTaDDRESS(3) = Address3.Text

If ListBox1.SelectedItem = "Go" Then
Call CopyFORM(NUM:=iNPUTaDDRESS(1), Hey:=Status1)
End If

If ListBox2.SelectedItem = "Go" Then
Call CopyFORM(NUM:=iNPUTaDDRESS(2), Hey:=Status2)
End If

If ListBox3.SelectedItem = "Go" Then
Call CopyFORM(NUM:=iNPUTaDDRESS(2), Hey:=Status3)
End If
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub
End Class




Public Class Browse

Public Sub Start_Click_1()
RefreshWeb.Enabled = True
End Sub

Private Sub ActiveMe_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ActiveMe.Tick
If ((WebBrowser1.IsBusy)) Then
HEY.BackColor = Color.Black
Else
HEY.BackColor = Color.Green
End If
End Sub

Private Sub RefreshWeb_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RefreshWeb.Tick
WebBrowser1.Navigate(Address1.Text)
End Sub

PLEASE TELL ME HOW TO FIX THIS
 
Last edited:
Back
Top