Results 1 to 14 of 14

Thread: Problem with Streamreader and Notify Icon Tip

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2009
    Posts
    66

    Exclamation Problem with Streamreader and Notify Icon Tip

    im having problem with this code, what i want it to do it go on the site nd if it finds the word online it switches the text

    so say it directed to google and the word online is somewhere in the html code of the site, the app should then change label 5 to online
    BUT i get this error

    "Could not find file 'C:\Users\Owner\Desktop\AMi BETA\AMi BETA\bin\Debug\www.google.com'."
    -----------------------
    everything i want the notifyicon to do is working but i only want it to pop up once but every time the timer ticks it pops up

    Code:
     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ServerStatus.Tick
            Dim LB5 As String = Label5.Text
            Dim wc As New System.Net.WebClient()
            Dim sr As New IO.StreamReader(wc.OpenRead(LB5))
          Dim s As String = sr.ReadToEnd()
              sr.Close()
            If s.Contains("Online") Then
                Status.Text = "Online"
                Status.ForeColor = Color.LimeGreen
                If Me.Visible = False Then
                    'Tip Pops up
                    NotifyIcon1.BalloonTipText = Label1.Text & " is Online!"
                    NotifyIcon1.ShowBalloonTip(5000)
    
                End If
            Else
                Me.Status.Text = "Offline"
                Status.ForeColor = Color.Red
            End If
        End Sub
    Last edited by iace; Feb 26th, 2011 at 06:43 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width