Imports YahooWeatherLib.YahooWeatherForecast
Imports NextUI.Collection
Imports NextUI.Component
Imports NextUI.Frame
Imports System.Collections.Generic
Imports System.Data
Imports System.IO
Imports System.Net
Imports System.ComponentModel
Imports System.Drawing
Imports System.Threading
Imports System.Text.RegularExpressions
Imports System.Text
Imports System.Environment
Imports System.Windows.Forms
Imports System.Runtime.InteropServices
Public Class frmWeather
'Code by RSPercy 02/25/2010
Dim DDcursor As String = GetFolderPath(SpecialFolder.MyDocuments) & "\Cursors\Daffy Duck.cur"
Dim cpCursor As String = GetFolderPath(SpecialFolder.MyDocuments) & "\Cursors\cpcur.cur"
Dim cpCursorOrange As String = GetFolderPath(SpecialFolder.MyDocuments) & "\Cursors\cpcurorange.cur"
Dim cpCamillialien As String = GetFolderPath(SpecialFolder.MyDocuments) & "\Cursors\cpcamilli-alien.cur"
Dim myCapImage As String = GetFolderPath(SpecialFolder.MyPictures) & "\YahooWeatherPics\CapImage.png"
Dim oldTemp As Integer
Dim newTemp As Integer
Dim oldWindD As Integer
Dim newWindD As Integer
Dim oldWindS As Integer
Dim newWindS As Integer
Dim strMyString As String = String.Empty
Dim HI As Long 'Heat Index
Dim AT As Integer 'Air Temperature
Dim RH As Integer 'Relative Humidity
Dim DP As Integer 'Dew Point
Dim strGUID As String = String.Empty
Const C1 As Double = 16.923
Const C2 As Double = 1.85212 * (10 ^ -1) '* AT
Const C3 As Double = 5.37941 '*RH
Const C4 As Double = 1.00254 * (10 ^ -1) '* AT * RH
Const C5 As Double = 9.41695 * (10 ^ -3) '* (AT ^ 2)
Const C6 As Double = 7.28898 * (10 ^ -3) '* (RH ^ 2)
Const C7 As Double = 3.45372 * (10 ^ -4) '* (AT ^ 2) * RH
Const C8 As Double = 8.14971 * (10 ^ -4) '* AT * (RH ^ 2)
Const C9 As Double = 1.02102 * (10 ^ -5) '* (AT ^ 2) * (RH ^ 2)
Const C10 As Double = 3.8646 * (10 ^ -5) '* (AT ^ 3)
Const C11 As Double = 2.91583 * (10 ^ -5) '* (RH ^ 3)
Const C12 As Double = 1.42721 * (10 ^ -6) '* (AT ^ 3) * RH
Const C13 As Double = 1.97483 * (10 ^ -7) '* (AT) * (RH ^ 3)
Const C14 As Double = 2.18429 * (10 ^ -8) '* (AT ^ 3) * (RH ^ 2)
Const C15 As Double = 8.43296 * (10 ^ -10) ' * (AT ^ 2) * (RH ^ 3)
Const C16 As Double = 4.81975 * (10 ^ -11) '* (AT ^ 3) * (RH ^ 3)
'Rounded Corners Variable.
Dim radius As Integer = 15
'DropShadow Constant.
Private Const CS_DROPSHADOW As Integer = 131072
'Form dragging Variables.
Dim isDragging As Boolean
Dim pointClicked As Point
<DllImport("user32.dll")> _
Private Shared Function LoadCursorFromFile(ByVal path As String) As IntPtr
End Function
<DllImport("user32.dll")> _
Private Shared Function SetCursorPos(ByVal x As Integer, ByVal y As Integer) As Boolean
End Function
Private Sub RoundMyCorners()
'Code by RSPercy 02/25/2010
Dim frmToRnd As System.Windows.Forms.Form = Me
Dim regionRects(radius * 2 + 2) As System.Drawing.Rectangle
Dim circle As New Bitmap(radius * 2, radius * 2)
Dim g As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(circle)
g.Clear(Color.White)
g.FillEllipse(Brushes.Black, 0, 0, circle.Width, circle.Height)
Dim col As Integer = 0
For row As Integer = 0 To radius - 1
For col = 0 To radius - 1
If circle.GetPixel(col, row) <> System.Drawing.Color.FromArgb(255, 255, 255, 255) Then Exit For
Next
regionRects(row * 2) = New System.Drawing.Rectangle(col, row, frmToRnd.Width - 2 * col, 1)
regionRects(row * 2 + 1) = New System.Drawing.Rectangle(col, frmToRnd.Height - row - 1, frmToRnd.Width - 2 * col, 1)
Next
regionRects(radius * 2 + 2) = New System.Drawing.Rectangle(0, radius, frmToRnd.Width, frmToRnd.Height - circle.Height)
Dim myPath As New Drawing2D.GraphicsPath
myPath.AddRectangles(regionRects)
frmToRnd.Region = New Region(myPath)
End Sub
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
'Code by RSPercy 02/25/2010
Application.Exit()
End Sub
Private Sub frmWeather_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Code by RSPercy 02/25/2010
Dim pathZips As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & "\USZIPS.txt"
cmbZip.Items.Clear()
OpentextFile(pathZips)
ClearTextFields()
cmbZip.SelectedIndex = 13552
Try
SetCursorPos((My.Computer.Screen.WorkingArea.Width - Cursor.Size.Width) / 2, _
(My.Computer.Screen.WorkingArea.Height - Cursor.Size.Height) / 2)
AddHandler WDTimer.Tick, New EventHandler(AddressOf WDTimer_Tick)
AddHandler WSTimer.Tick, New EventHandler(AddressOf WSTimer_Tick)
AddHandler TMPTimer.Tick, New EventHandler(AddressOf TMPTimer_Tick)
AddHandler timeTimer.Tick, New EventHandler(AddressOf timeTimer_Tick)
AddHandler RichTextBox1.LinkClicked, New LinkClickedEventHandler(AddressOf RichTextBox1_LinkClicked)
Me.Cursor = New Cursor(LoadCursorFromFile(DDcursor))
RoundMyCorners()
Dim t As New YahooWeatherLib.YahooWeatherForecast(cmbZip.Text, "f")
timeTimer.Enabled = True
oldTemp = 0
newTemp = 0
oldWindD = 0
newWindD = 0
oldWindS = 0
newWindS = 0
'GetFiveDates()
btnGo.PerformClick()
pbMap1.ImageLocation = "http://weather.yahoo.com/images/actheat_440x297.jpg"
CreateTempGauge()
CreateWindDirectionGauge()
CreateWindSpeedGauge()
GetAboutInfo()
Catch ex As Exception
MessageBox.Show("Weather is not available for your area..." & vbCrLf & _
"Please try again later!" & vbCrLf & vbCrLf & _
"Application will now Close!", "Info to the Rescue")
Application.Exit()
End Try
End Sub
Private Sub CreateTempGauge()
'Code by RSPercy 02/25/2010
Dim hfTemp As HorizontalFrame = New HorizontalFrame(New Rectangle(1, 1, 912, 50))
Me.BaseUI1.Frame.Add(hfTemp)
hfTemp.BackRenderer.CenterColor = Color.DarkRed
hfTemp.BackRenderer.EndColor = Color.Black
Dim bar1 As New HorizontalScaleBar(hfTemp)
bar1.StartValue = -60
bar1.EndValue = 120
bar1.MajorTickNumber = 19
bar1.MinorTicknumber = 1
bar1.CustomLabel = New String() {"-60", "-50", "-40", "-30", "-20", _
"-10", "0", "10", "20", "30", _
"40", "50", "60", "70", "80", _
"90", "100", "110", "120"}
bar1.TickMajor.Width = 3
bar1.TickMajor.Height = 12
bar1.TickMajor.FillColor = Color.Lime
bar1.TickMajor.Type = TickBase.TickType.RoundedRect
bar1.TickMinor.Width = 3
bar1.TickMinor.Height = 8
bar1.TickMinor.FillColor = Color.Lime
bar1.TickMinor.TickPosition = TickBase.Position.Cross
bar1.TickMinor.Type = TickBase.TickType.RoundedRect
bar1.FillColor = Color.DarkBlue
bar1.TickLabel.FontColor = Color.White
bar1.TickLabel.LabelFont = New Font("Elephant", 8, FontStyle.Regular)
hfTemp.ScaleCollection.Add(bar1)
Dim pointer As HorizontalPointer = New HorizontalPointer(hfTemp)
bar1.Pointer.Add(pointer)
bar1.Pointer(0).BasePointer.PointerShapeType = Pointerbase.PointerType.Type1
bar1.Pointer(0).BasePointer.FillColor = Color.Blue
bar1.Pointer(0).BasePointer.Length = 15
End Sub
Private Sub CreateWindDirectionGauge()
'Code by RSPercy 02/25/2010
Dim hfWindD As HorizontalFrame = New HorizontalFrame(New Rectangle(1, 1, 912, 50))
Me.BaseUI2.Frame.Add(hfWindD)
hfWindD.BackRenderer.CenterColor = Color.DarkRed
hfWindD.BackRenderer.EndColor = Color.Black
Dim bar2 As New HorizontalScaleBar(hfWindD)
bar2.StartValue = 0
bar2.EndValue = 360
bar2.MajorTickNumber = 17
bar2.MinorTicknumber = 1
bar2.CustomLabel = New String() {"N", "NNE", "NE", "ENE", _
"E", "ESE", "SE", "SSE", _
"S", "SSW", "SW", "WSW", _
"W", "WNW", "NW", "NNW", "N"}
bar2.TickMajor.Width = 3
bar2.TickMajor.Height = 12
bar2.TickMajor.FillColor = Color.Lime
bar2.TickMajor.Type = TickBase.TickType.RoundedRect
bar2.TickMinor.Width = 3
bar2.TickMinor.Height = 8
bar2.TickMinor.FillColor = Color.Lime
bar2.TickMinor.TickPosition = TickBase.Position.Cross
bar2.TickMinor.Type = TickBase.TickType.RoundedRect
bar2.FillColor = Color.DarkBlue
bar2.TickLabel.FontColor = Color.White
bar2.TickLabel.LabelFont = New Font("Elephant", 8, FontStyle.Regular)
Dim pointer As HorizontalPointer = New HorizontalPointer(hfWindD)
bar2.Pointer.Add(pointer)
bar2.Pointer(0).BasePointer.PointerShapeType = Pointerbase.PointerType.Type1
bar2.Pointer(0).BasePointer.FillColor = Color.Blue
bar2.Pointer(0).BasePointer.Length = 15
hfWindD.ScaleCollection.Add(bar2)
End Sub
Private Sub CreateWindSpeedGauge()
'Code by RSPercy 02/25/2010
Dim hfWindS As HorizontalFrame = New HorizontalFrame(New Rectangle(1, 1, 912, 50))
Me.BaseUI3.Frame.Add(hfWindS)
hfWindS.BackRenderer.CenterColor = Color.DarkRed
hfWindS.BackRenderer.EndColor = Color.Black
Dim bar3 As New HorizontalScaleBar(hfWindS)
bar3.StartValue = 0
bar3.EndValue = 160
bar3.MajorTickNumber = 17
bar3.MinorTicknumber = 1
bar3.CustomLabel = New String() {"0", "10", "20", "30", _
"40", "50", "60", "70", _
"80", "90", "100", "110", _
"120", "130", "140", "150", "160"}
bar3.TickMajor.Width = 3
bar3.TickMajor.Height = 12
bar3.TickMajor.FillColor = Color.Lime
bar3.TickMajor.Type = TickBase.TickType.RoundedRect
bar3.TickMinor.Width = 3
bar3.TickMinor.Height = 8
bar3.TickMinor.FillColor = Color.Lime
bar3.TickMinor.TickPosition = TickBase.Position.Cross
bar3.TickMinor.Type = TickBase.TickType.RoundedRect
bar3.FillColor = Color.DarkBlue
bar3.TickLabel.FontColor = Color.White
bar3.TickLabel.LabelFont = New Font("Elephant", 8, FontStyle.Regular)
Dim pointer As HorizontalPointer = New HorizontalPointer(hfWindS)
bar3.Pointer.Add(pointer)
bar3.Pointer(0).BasePointer.PointerShapeType = Pointerbase.PointerType.Type1
bar3.Pointer(0).BasePointer.FillColor = Color.Blue
bar3.Pointer(0).BasePointer.Length = 15
hfWindS.ScaleCollection.Add(bar3)
End Sub
Private Sub frmWeather_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
'Code by RSPercy 02/25/2010
If e.Button = Windows.Forms.MouseButtons.Left Then
Me.isDragging = True
pointClicked = New Point(e.X, e.Y)
Else
Me.isDragging = False
End If
End Sub
Private Sub frmWeather_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
'Code by RSPercy 02/25/2010
If Me.isDragging Then
Dim pointMovedTo As Point
pointMovedTo = Me.PointToScreen(New Point(e.X, e.Y))
pointMovedTo.Offset(-pointClicked.X, -pointClicked.Y)
Me.Location = pointMovedTo
End If
End Sub
Private Sub frmWeather_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp
'Code by RSPercy 02/25/2010
Me.isDragging = False
End Sub
Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams
'Code by RSPercy 02/25/2010
Get
Dim cp As CreateParams = MyBase.CreateParams
cp.ClassStyle = cp.ClassStyle Or CS_DROPSHADOW
Return cp
End Get
End Property
Private Sub WDTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WDTimer.Tick
'Code by RSPercy 02/25/2010
If oldWindD < newWindD Then
oldWindD += 1
DirectCast((Me.BaseUI2.Frame(0)), HorizontalFrame).ScaleCollection(0).Pointer(0).Value = oldWindD
lblWindDirection.Text = "Wind Direction " & oldWindD.ToString() & "°"
If oldWindD = newWindD Then
oldWindD = newWindD
WDTimer.Enabled = False
End If
End If
If oldWindD > newWindD Then
oldWindD -= 1
DirectCast((Me.BaseUI2.Frame(0)), HorizontalFrame).ScaleCollection(0).Pointer(0).Value = oldWindD
lblWindDirection.Text = "Wind Direction " & oldWindD.ToString() & "°"
If oldWindD = newWindD Then
oldWindD = newWindD
WDTimer.Enabled = False
End If
End If
End Sub
Private Sub WSTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WSTimer.Tick
'Code by RSPercy 02/25/2010
If oldWindS < newWindS Then
oldWindS += 1
DirectCast((Me.BaseUI3.Frame(0)), HorizontalFrame).ScaleCollection(0).Pointer(0).Value = oldWindS
lblWindSpeed.Text = "Wind Speed " & oldWindS.ToString() & " mph"
If oldWindS = newWindS Then
oldWindS = newWindS
If newWindS = 0 Then
lblWindSpeed.Text = "Wind Speed is Calm."
End If
WSTimer.Enabled = False
End If
End If
If oldWindS > newWindS Then
oldWindS -= 1
DirectCast((Me.BaseUI3.Frame(0)), HorizontalFrame).ScaleCollection(0).Pointer(0).Value = oldWindS
lblWindSpeed.Text = "Wind Speed " & oldWindS.ToString() & " mph"
If oldWindS = newWindS Then
oldWindS = newWindS
If newWindS = 0 Then
lblWindSpeed.Text = "Wind Speed is Calm."
End If
WSTimer.Enabled = False
End If
End If
End Sub
Private Sub TMPTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TMPTimer.Tick
'Code by RSPercy 02/25/2010
If oldTemp < newTemp Then
oldTemp += 1
DirectCast((Me.BaseUI1.Frame(0)), HorizontalFrame).ScaleCollection(0).Pointer(0).Value = oldTemp
lblTemperature.Text = "Temperature " & oldTemp.ToString() & "°"
If oldTemp = newTemp Then
oldTemp = newTemp
TMPTimer.Enabled = False
End If
End If
If oldTemp > newTemp Then
oldTemp -= 1
DirectCast((Me.BaseUI1.Frame(0)), HorizontalFrame).ScaleCollection(0).Pointer(0).Value = oldTemp
lblTemperature.Text = "Temperature " & oldTemp.ToString() & "°"
If oldTemp = newTemp Then
oldTemp = newTemp
TMPTimer.Enabled = False
End If
End If
End Sub
Private Sub timeTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timeTimer.Tick
'Code by RSPercy 02/25/2010
lblTime.Text = FormatDateTime(Now, DateFormat.LongTime).ToString
End Sub
Private Sub RichTextBox1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkClickedEventArgs) Handles RichTextBox1.LinkClicked
'Code by RSPercy 02/25/2010
Process.Start(e.LinkText)
End Sub
Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGo.Click
'Code by RSPercy 02/25/2010
Try
Dim t As New YahooWeatherLib.YahooWeatherForecast(cmbZip.Text, "f") 't = all the goodies
lblLocation.Text = t.rss.channel.item.title 'Display the Title
lblHi.Text = t.rss.channel.item.forecast.high & "°" 'High temperature
lblLow.Text = t.rss.channel.item.forecast.low & "°" 'Low tempeerature
newWindD = t.rss.channel.wind.direction
newWindS = t.rss.channel.wind.speed
If newWindS = 0 Then
lblWindSpeed.Text = "Wind Speed is Calm."
End If
newTemp = t.rss.channel.item.condition.temp 'Current temperature
AT = newTemp 'A variable used in RetrieveHeatIndex
Get2DayForecast()
'GetFiveDayInfo()
lblCondition.Text = GetCondition(strMyString) 'Current Weather Condition
lblhumidity.Text = t.rss.channel.atmosphere.humidity 'Humidity percentage
RH = CInt(lblhumidity.Text) 'A variable used in RetrieveHeatIndex
lblHeatIndexWindChill.Text = RetrieveHeatIndex(HI) & "°" 'Heat Index
lblSunrise.Text = t.rss.channel.astronomy.sunrise 'Sunrise
lblSunset.Text = t.rss.channel.astronomy.sunset 'Sunset
lblVisibility.Text = t.rss.channel.atmosphere.visibility & " mi." 'Visibility
If t.rss.channel.atmosphere.rising = 0 Then
lblPressure.Text = t.rss.channel.atmosphere.pressure & " " & _
"in and steady"
ElseIf t.rss.channel.atmosphere.rising = 1 Then
lblPressure.Text = t.rss.channel.atmosphere.pressure & " " & _
"in and rising"
ElseIf t.rss.channel.atmosphere.rising = 2 Then
lblPressure.Text = t.rss.channel.atmosphere.pressure & " " & _
"in and falling"
End If
lblDewPoint.Text = GetDewPoint(RH).ToString() & "°"
RetrieveZipCode() 'Gets the zip-code and displays the correct doppler map
lblhumidity.Text += "%"
lblTemp.Text = newTemp.ToString & "°"
lblDate.Text = FormatDateTime(Now.Date, DateFormat.ShortDate)
WDTimer.Enabled = True
WSTimer.Enabled = True
TMPTimer.Enabled = True
lblDate1.Text = FormatDateTime(Now.Date, DateFormat.ShortDate).ToString()
lblDate2.Text = FormatDateTime(DateAdd(DateInterval.Day, 1, Now.Date))
Me.Text = "Weather One - " & t.rss.channel.title.ToString()
'MessageBox.Show(t.rss.channel.item.guid)
Catch ex As System.NullReferenceException
MessageBox.Show("Please Enter a Valid Zip-Code.", "Info to the Rescue")
cmbZip.Focus()
Catch 'exs As IOException
MessageBox.Show("Please Try Again Later. Weather is Not Available.", "Info to the Rescue")
cmbZip.Focus()
End Try
End Sub
Private Sub GetAboutInfo()
'Code by RSPercy 02/25/2010
Me.LabelProductName.Text = My.Application.Info.ProductName
Me.LabelVersion.Text = String.Format("Version {0}", My.Application.Info.Version.ToString)
Me.LabelCopyright.Text = My.Application.Info.Copyright
Me.LabelCompanyName.Text = My.Application.Info.CompanyName
Me.TextBoxDescription.Text = My.Application.Info.Description
End Sub
Private Sub Get2DayForecast()
'Code by RSPercy 10/22/09
Try
Dim parts() As String
Dim m As Match
Dim strMatch As String = String.Empty
Dim t As New YahooWeatherLib.YahooWeatherForecast(cmbZip.Text, "f")
'''''''''''''''''''''''''''Day, Condition, High, Low
Dim pattern As String = "\w*\s-\s(\w*|\w*\s\w*|\w*\s\w*\s\w*|\w*\s\w*\s\w*\s\w*|\w*\/\w*|\w*\/\w*\/\w*|\w*\s\w*\/\w*\s\w*|\w*\s\w*\/\w*|\w*\s\w*\/\w*\-\w*)\.\s\w*:\s\d{1,3}\s\w*:\s\d{1,3}"
Dim input As String = t.rss.channel.item.description
For Each m In Regex.Matches(input, pattern, RegexOptions.Multiline)
strMatch = m.Value
If strMatch = Nothing Then
Exit For
Else
strMatch = strMatch.Replace(" - ", ",")
strMatch = strMatch.Replace(". High: ", ",")
strMatch = strMatch.Replace(" Low: ", ",")
'MessageBox.Show(strMatch) 'For testing ONLY
parts = Split(strMatch, ",")
If parts(0) <> t.rss.channel.item.forecast.day Then
lblTomorrow.Text = parts(0)
lblcc2.Text = parts(1)
RetrieveForecastCode()
lblHigh2.Text = "High: " & parts(2)
lblLow2.Text = "Low : " & parts(3)
ElseIf parts(0) = t.rss.channel.item.forecast.day Then
lblcc1.Text = parts(1)
RetrieveForecast1()
lblHigh1.Text = "High: " & parts(2)
lblLow1.Text = "Low : " & parts(3)
End If
End If
Next
Catch ex As Exception
MessageBox.Show("Sorry...Try again later!", "Info to the Rescue!")
End Try
End Sub
Private Sub RetrieveForecastCode()
'Code by RSPercy 02/25/2010
Dim strPath As String = GetFolderPath(SpecialFolder.MyPictures) & "\YahooWeatherPics\"
Dim t As New YahooWeatherLib.YahooWeatherForecast(cmbZip.Text, "f")
'Retrieve the condition for Tomorrows forecast and
'Add a pic of the current weather condition
If Trim(lblcc2.Text) = "Tornado" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/1d.png"
ElseIf Trim(lblcc2.Text) = "Tropical Storm" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/1d.png"
ElseIf Trim(lblcc2.Text) = "Hurricane" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/2d.png"
ElseIf Trim(lblcc2.Text) = "Severe Thunderstorms" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/3d.png"
ElseIf Trim(lblcc2.Text) = "Thunderstorms" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/4d.png"
ElseIf Trim(lblcc2.Text) = "Mixed Rain and Snow" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/5d.png"
ElseIf Trim(lblcc1.Text) = "Mixed Rain and Sleet" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/6d.png"
ElseIf Trim(lblcc2.Text) = "Freezing Drizzle" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/8d.png"
ElseIf Trim(lblcc2.Text) = "Drizzle" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc2.Text) = "AM Drizzle" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc2.Text) = "PM Drizzle" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc2.Text) = "Drizzle Early" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc2.Text) = "Drizzle Late" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc2.Text) = "Drizzle/Fog" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc2.Text) = "Freezing Rain" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/10d.png"
ElseIf Trim(lblcc2.Text) = "Showers" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/11d.png"
ElseIf Trim(lblcc2.Text) = "Snow Flurries" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/13d.png"
ElseIf Trim(lblcc2.Text) = "Light Snow Showers" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/14d.png"
ElseIf Trim(lblcc2.Text) = "Blowing Snow" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/15d.png"
ElseIf Trim(lblcc2.Text) = "Snow" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/16d.png"
ElseIf Trim(lblcc2.Text) = "Hail" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/17d.png"
ElseIf Trim(lblcc2.Text) = "Sleet" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/18d.png"
ElseIf Trim(lblcc2.Text) = "Dust" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/19d.png"
ElseIf Trim(lblcc2.Text) = "Dust" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/19n.png"
ElseIf Trim(lblcc2.Text) = "Foggy" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/20d.png"
ElseIf Trim(lblcc2.Text) = "AM Fog/PM Sun" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/20d.png"
ElseIf Trim(lblcc2.Text) = "Haze" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/21d.png"
ElseIf Trim(lblcc2.Text) = "Haze" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/21n.png"
ElseIf Trim(lblcc2.Text) = "Smoky" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/22d.png"
ElseIf Trim(lblcc2.Text) = "Blustery" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/23d.png"
ElseIf Trim(lblcc2.Text) = "Windy" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/24d.png"
ElseIf Trim(lblcc2.Text) = "Cold" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/25d.png"
ElseIf Trim(lblcc2.Text) = "Cloudy" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/26d.png"
ElseIf Trim(lblcc2.Text) = "Cloudy/Wind" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/26d.png"
ElseIf Trim(lblcc2.Text) = "Mostly Cloudy" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/28d.png"
ElseIf Trim(lblcc2.Text) = "Mostly Cloudy/Wind" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/28d.png"
ElseIf Trim(lblcc2.Text) = "Partly Cloudy" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/30d.png"
ElseIf Trim(lblcc2.Text) = "Partly Cloudy/Wind" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/30d.png"
ElseIf Trim(lblcc2.Text) = "Clouds Late/Clearing Early" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/26d.png"
ElseIf Trim(lblcc2.Text) = "Clouds Early/Clearing Late" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/26d.png"
ElseIf Trim(lblcc2.Text) = "Clear" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/31d.png"
ElseIf Trim(lblcc2.Text) = "Mostly Clear" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/31d.png"
ElseIf Trim(lblcc2.Text) = "PM Clear" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/31n.png"
ElseIf Trim(lblcc2.Text) = "AM Clear" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/31d.png"
ElseIf Trim(lblcc2.Text) = "Mostly Sunny" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/32d.png"
ElseIf Trim(lblcc2.Text) = "Mostly Sunny/Wind" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/32d.png"
ElseIf Trim(lblcc2.Text) = "Sunny" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/32d.png"
ElseIf Trim(lblcc2.Text) = "Sunny/Wind" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/32d.png"
ElseIf Trim(lblcc2.Text) = "Fair" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/33d.png"
ElseIf Trim(lblcc2.Text) = "Mixed Rain and Hail" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/35d.png"
ElseIf Trim(lblcc2.Text) = "Hot" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/36d.png"
ElseIf Trim(lblcc2.Text) = "Isolated Thunderstorms" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/37d.png"
ElseIf Trim(lblcc2.Text) = "Scattered Thunderstorms" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/38d.png"
ElseIf Trim(lblcc2.Text) = "Scattered Thunderstorms/Wind" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/38d.png"
ElseIf Trim(lblcc2.Text) = "PM Thunderstorms" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/38n.png"
ElseIf Trim(lblcc2.Text) = "Thunderstorms Late" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/38n.png"
ElseIf Trim(lblcc2.Text) = "AM Thunderstorms" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/38d.png"
ElseIf Trim(lblcc2.Text) = "Thunderstorms Early" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/38d.png"
ElseIf Trim(lblcc2.Text) = "PM Showers" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/39n.png"
ElseIf Trim(lblcc2.Text) = "PM Showers/Wind" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/39n.png"
ElseIf Trim(lblcc2.Text) = "Showers Late" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/39n.png"
ElseIf Trim(lblcc2.Text) = "Showers/Wind" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc2.Text) = "Few Showers/Wind" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc2.Text) = "Rain/Wind" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/10d.png"
ElseIf Trim(lblcc2.Text) = "Rain/Thunder/Wind" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/10d.png"
ElseIf Trim(lblcc2.Text) = "AM Showers" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/39d.png"
ElseIf Trim(lblcc2.Text) = "AM Showers/Wind" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/39d.png"
ElseIf Trim(lblcc2.Text) = "Showers Early" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/39d.png"
ElseIf Trim(lblcc2.Text) = "Few Showers" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/39d.png"
ElseIf Trim(lblcc2.Text) = "Light Rain" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc2.Text) = "Rain Early" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc2.Text) = "Rain" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc2.Text) = "Rain/Snow" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc2.Text) = "Heavy Rain" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/10d.png"
ElseIf Trim(lblcc2.Text) = "Heavy Rain/Wind" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/10d.png"
ElseIf Trim(lblcc2.Text) = "Heavy Thunderstorms" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/3d.png"
ElseIf Trim(lblcc2.Text) = "Scattered Showers" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/40d.png"
ElseIf Trim(lblcc2.Text) = "Heavy Snow" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/41d.png"
ElseIf Trim(lblcc2.Text) = "Scattered Snow Showers" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/42d.png"
ElseIf Trim(lblcc2.Text) = "Thundershowers" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/45d.png"
ElseIf Trim(lblcc2.Text) = "Snow Showers" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/46d.png"
ElseIf Trim(lblcc2.Text) = "Isolated Thundershowers" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/47d.png"
ElseIf Trim(lblcc2.Text) = "AM Thundershowers" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/47d.png"
ElseIf Trim(lblcc2.Text) = "PM Thundershowers" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/47n.png"
ElseIf Trim(lblcc2.Text) = "Rain/Thunder" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/8d.png"
ElseIf Trim(lblcc2.Text) = "AM Clouds/PM Sun" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/30d.png"
ElseIf Trim(lblcc2.Text) = "AM Sun/PM Clouds" Then
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/30d.png"
ElseIf Trim(lblcc2.Text) = "" Then
lblcc2.Text = "Not Available"
picSmall2.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/44d.png"
End If
End Sub
Private Sub RetrieveForecast1()
'Code by RSPercy 02/25/2010
Dim strPath As String = GetFolderPath(SpecialFolder.MyPictures) & "\YahooWeatherPics\"
Dim t As New YahooWeatherLib.YahooWeatherForecast(cmbZip.Text, "f")
'Retrieve the condition for Todays forecast and
'Add a pic of the current weather condition
If Trim(lblcc1.Text) = "Tornado" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/1d.png"
ElseIf Trim(lblcc1.Text) = "Tropical Storm" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/1d.png"
ElseIf Trim(lblcc1.Text) = "Hurricane" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/2d.png"
ElseIf Trim(lblcc1.Text) = "Severe Thunderstorms" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/3d.png"
ElseIf Trim(lblcc1.Text) = "Thunderstorms" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/4d.png"
ElseIf Trim(lblcc1.Text) = "Mixed Rain and Snow" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/5d.png"
ElseIf Trim(lblcc1.Text) = "Mixed Rain and Sleet" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/6d.png"
ElseIf Trim(lblcc1.Text) = "Mixed Snow and Sleet" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/7d.png"
ElseIf Trim(lblcc1.Text) = "Freezing Drizzle" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/8d.png"
ElseIf Trim(lblcc1.Text) = "Drizzle" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc1.Text) = "AM Drizzle" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc1.Text) = "PM Drizzle" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc1.Text) = "Drizzle Early" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc1.Text) = "Drizzle Late" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc1.Text) = "Drizzle/Fog" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc1.Text) = "Freezing Rain" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/10d.png"
ElseIf Trim(lblcc1.Text) = "Showers" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/11d.png"
ElseIf Trim(lblcc1.Text) = "Snow Flurries" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/13d.png"
ElseIf Trim(lblcc1.Text) = "Light Snow Showers" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/14d.png"
ElseIf Trim(lblcc1.Text) = "Blowing Snow" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/15d.png"
ElseIf Trim(lblcc1.Text) = "Snow" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/16d.png"
ElseIf Trim(lblcc1.Text) = "Hail" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/17d.png"
ElseIf Trim(lblcc1.Text) = "Sleet" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/18d.png"
ElseIf Trim(lblcc1.Text) = "Dust" Then 'Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/19d.png"
ElseIf Trim(lblcc1.Text) = "Dust" Then 'Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/19n.png"
ElseIf Trim(lblcc1.Text) = "Foggy" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/20d.png"
ElseIf Trim(lblcc1.Text) = "AM Fog/PM Sun" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/20d.png"
ElseIf Trim(lblcc1.Text) = "Haze" Then 'Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/21d.png"
ElseIf Trim(lblcc1.Text) = "Haze" Then 'Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/21n.png"
ElseIf Trim(lblcc1.Text) = "Smoky" Then 'Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/22d.png"
'ElseIf Trim(lblcc1.Text) = "Smoky" Then 'Then
'picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/22n.png"
ElseIf Trim(lblcc1.Text) = "Blustery" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/23d.png"
ElseIf Trim(lblcc1.Text) = "Windy" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/24d.png"
ElseIf Trim(lblcc1.Text) = "Cold" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/25d.png"
ElseIf Trim(lblcc1.Text) = "Cloudy" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/26d.png"
ElseIf Trim(lblcc1.Text) = "Cloudy/Wind" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/26d.png"
ElseIf Trim(lblcc1.Text) = "Mostly Cloudy" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/28d.png"
ElseIf Trim(lblcc1.Text) = "Mostly Cloudy/Wind" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/28d.png"
ElseIf Trim(lblcc1.Text) = "Partly Cloudy" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/30d.png"
ElseIf Trim(lblcc1.Text) = "Partly Cloudy/Wind" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/30d.png"
ElseIf Trim(lblcc1.Text) = "Clouds Late/Clearing Early" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/26d.png"
ElseIf Trim(lblcc1.Text) = "Clouds Early/Clearing Late" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/26d.png"
ElseIf Trim(lblcc1.Text) = "Clear" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/31d.png"
ElseIf Trim(lblcc1.Text) = "Mostly Clear" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/31d.png"
ElseIf Trim(lblcc1.Text) = "AM Clear" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/31d.png"
ElseIf Trim(lblcc1.Text) = "PM Clear" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/31n.png"
ElseIf Trim(lblcc1.Text) = "Mostly Sunny" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/32d.png"
ElseIf Trim(lblcc1.Text) = "Mostly Sunny/Wind" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/32d.png"
ElseIf Trim(lblcc1.Text) = "Sunny" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/32d.png"
ElseIf Trim(lblcc1.Text) = "Sunny/Wind" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/32d.png"
ElseIf Trim(lblcc1.Text) = "Fair" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/33d.png"
ElseIf Trim(lblcc1.Text) = "Mixed Rain and Hail" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/35d.png"
ElseIf Trim(lblcc1.Text) = "Hot" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/36d.png"
ElseIf Trim(lblcc1.Text) = "Isolated Thunderstorms" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/37d.png"
ElseIf Trim(lblcc1.Text) = "Scattered Thunderstorms" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/38d.png"
ElseIf Trim(lblcc1.Text) = "Scattered Thunderstorms/Wind" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/38d.png"
ElseIf Trim(lblcc1.Text) = "PM Thunderstorms" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/38n.png"
ElseIf Trim(lblcc1.Text) = "Thunderstorms Late" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/38n.png"
ElseIf Trim(lblcc1.Text) = "AM Thunderstorms" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/38d.png"
ElseIf Trim(lblcc1.Text) = "Thunderstorms Early" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/38d.png"
ElseIf Trim(lblcc1.Text) = "PM Showers" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/39n.png"
ElseIf Trim(lblcc1.Text) = "PM Showers/Wind" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/39n.png"
ElseIf Trim(lblcc1.Text) = "Light Rain" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc1.Text) = "Rain" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc1.Text) = "Rain/Snow" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc1.Text) = "Heavy Rain" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/10d.png"
ElseIf Trim(lblcc1.Text) = "Heavy Rain/Wind" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/10d.png"
ElseIf Trim(lblcc1.Text) = "Heavy Thunderstorms" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/3d.png"
ElseIf Trim(lblcc1.Text) = "Rain Early" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc1.Text) = "AM Showers" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/39d.png"
ElseIf Trim(lblcc1.Text) = "AM Showers/Wind" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/39d.png"
ElseIf Trim(lblcc1.Text) = "Showers Early" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/39d.png"
ElseIf Trim(lblcc1.Text) = "Showers/Wind" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
ElseIf Trim(lblcc1.Text) = "Rain/Wind" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/10d.png"
ElseIf Trim(lblcc1.Text) = "Rain/Thunder/Wind" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/10d.png"
ElseIf Trim(lblcc1.Text) = "Few Showers" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/39d.png"
ElseIf Trim(lblcc1.Text) = "Few Showers/Wind" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/39d.png"
ElseIf Trim(lblcc1.Text) = "Showers Late" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/39n.png"
ElseIf Trim(lblcc1.Text) = "Scattered Showers" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/40d.png"
ElseIf Trim(lblcc1.Text) = "Heavy Snow" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/41d.png"
ElseIf Trim(lblcc1.Text) = "Scattered Snow Showers" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/42d.png"
ElseIf Trim(lblcc1.Text) = "Thundershowers" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/45d.png"
ElseIf Trim(lblcc1.Text) = "Snow Showers" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/46d.png"
ElseIf Trim(lblcc1.Text) = "AM Thundershowers" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/47d.png"
ElseIf Trim(lblcc1.Text) = "PM Thundershowers" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/47n.png"
ElseIf Trim(lblcc1.Text) = "Isolated Thundershowers" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/47d.png"
ElseIf Trim(lblcc1.Text) = "Rain/Thunder" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/8d.png"
ElseIf Trim(lblcc1.Text) = "AM Clouds/PM Sun" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/30d.png"
ElseIf Trim(lblcc1.Text) = "AM Sun/PM Clouds" Then
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/30d.png"
ElseIf Trim(lblcc1.Text) = "" Then
lblcc1.Text = "Not Available"
picSmall1.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/44d.png"
End If
End Sub
Private Function GetDewPoint(ByVal intRH As Integer) As Integer
'Code by RSPercy 02/25/2010
Dim dewpoint As Integer
Select Case intRH
Case 50 To 52
dewpoint = AT - 15
Case 53 To 55
dewpoint = AT - 14
Case 56 To 59
dewpoint = AT - 13
Case 60 To 63
dewpoint = AT - 12
Case 64 To 66
dewpoint = AT - 11
Case 67 To 69
dewpoint = AT - 10
Case 70 To 72
dewpoint = AT - 9
Case 73 To 76
dewpoint = AT - 8
Case 77 To 79
dewpoint = AT - 7
Case 80 To 82
dewpoint = AT - 6
Case 83 To 85
dewpoint = AT - 5
Case 86 To 89
dewpoint = AT - 4
Case 90 To 93
dewpoint = AT - 3
Case 94 To 96
dewpoint = AT - 2
Case 97 To 99
dewpoint = AT - 1
Case 100
dewpoint = AT
Case Else
dewpoint = Math.Round(AT - ((100 - RH) / 5))
End Select
Return dewpoint
End Function
Private Sub RetrieveZipCode()
'Code by RSPercy 02/25/2010
Dim MZ As Integer = CInt(cmbZip.Text)
Try
Select Case MZ 'American Zip-Codes
Case 501, 544, 1001 To 5907, 6001 To 6928, 7001 To 8989, _
10001 To 14925, 15001 To 19612, 46001 To 47997, 48001 To 49971
'pbMap2.ImageLocation = "http://weather.yahoo.com/images/northeast_sat_440x297.jpg"
pbMap.ImageLocation = "http://weather.yahoo.com/images/us_ne_9regradar_medium_usen.jpg"
'pbMap3.ImageLocation = "http://weather.yahoo.com/images/na_unitedstates_ne_outlookf_en_US_440_mdy_y.jpg"
Case 29001 To 29945, 30002 To 31999, 32003 To 34997, 35004 To 36925, 38601 To 39776, 39813 To 39901
'pbMap2.ImageLocation = "http://weather.yahoo.com/images/southeast_sat_440x297.jpg"
pbMap.ImageLocation = "http://weather.yahoo.com/images/us_se_9regradar_medium_usen.jpg"
'pbMap3.ImageLocation = "http://weather.yahoo.com/images/na_unitedstates_se_outlookf_en_US_440_mdy_y.jpg"
Case 19701 To 19980, 20101 To 20587, 20588 To 21930, 22001 To 24658, 24701 To 26886, _
27006 To 28909, 37010 To 38589, 40003 To 42788, 43001 To 45999
'pbMap2.ImageLocation = "http://weather.yahoo.com/images/east_cen_sat_440x297.jpg"
pbMap.ImageLocation = "http://weather.yahoo.com/images/us_ec_9regradar_medium_usen.jpg"
'pbMap3.ImageLocation = "http://weather.yahoo.com/images/na_unitedstates_ec_outlookf_en_US_440_mdy_y.jpg"
Case 70001 To 71497, 71601 To 72959, 73001 To 73198, 73301, 73344, 73401 To 74960, _
75001 To 76958, 77001 To 79999, 88510 To 88595
'pbMap2.ImageLocation = "http://weather.yahoo.com/images/s_central_sat_440x297.jpg"
pbMap.ImageLocation = "http://weather.yahoo.com/images/us_sc_9regradar_medium_usen.jpg"
'pbMap3.ImageLocation = "http://weather.yahoo.com/images/na_unitedstates_sc_outlookf_en_US_440_mdy_y.jpg"
Case 60001 To 62999, 63001 To 65899, 66002 To 66211
'pbMap2.ImageLocation = "http://weather.yahoo.com/images/central_sat_440x297.jpg"
pbMap.ImageLocation = "http://weather.yahoo.com/images/us_cn_9regradar_medium_usen.jpg"
'pbMap3.ImageLocation = "http://weather.yahoo.com/images/na_unitedstates_cn_outlookf_en_US_440_mdy_y.jpg"
Case 50001 To 52809, 53001 To 54990, 55001 To 56763, 57001 To 57799, 58001 To 58856, 68001 To 69367
'pbMap2.ImageLocation = "http://weather.yahoo.com/images/n_central_sat_440x297.jpg"
pbMap.ImageLocation = "http://weather.yahoo.com/images/us_nc_9regradar_medium_usen.jpg"
'pbMap3.ImageLocation = "http://weather.yahoo.com/images/na_unitedstates_nc_outlookf_en_US_440_mdy_y.jpg"
Case 59001 To 59937, 83201 To 83887, 97001 To 97920, 98001 To 99403
'pbMap2.ImageLocation = "http://weather.yahoo.com/images/northwest_sat_440x297.jpg"
pbMap.ImageLocation = "http://weather.yahoo.com/images/us_nw_9regradar_medium_usen.jpg"
'pbMap3.ImageLocation = "http://weather.yahoo.com/images/na_unitedstates_nw_outlookf_en_US_440_mdy_y.jpg"
Case 80001 To 81658, 82001 To 82010, 82050 To 82084, 82190, 82201, _
82210 To 82244, 82301 To 83128, 83414, 84001 To 84791, 88901 To 89883, 90001 To 96162
'pbMap2.ImageLocation = "http://weather.yahoo.com/images/west_cen_sat_440x297.jpg"
pbMap.ImageLocation = "http://weather.yahoo.com/images/us_wc_9regradar_medium_usen.jpg"
'pbMap3.ImageLocation = "http://weather.yahoo.com/images/na_unitedstates_wc_outlookf_en_US_440_mdy_y.jpg"
Case 85001 To 85087, 85097 To 85099, 85201 To 85312, 85318, 85320 To 85396, 85501, 85502, _
85530 To 85554, 85601 To 85655, 85658, 85662 To 86556, 87001 To 88439
'pbMap2.ImageLocation = "http://weather.yahoo.com/images/southwest_sat_440x297.jpg"
pbMap.ImageLocation = "http://weather.yahoo.com/images/us_sw_9regradar_medium_usen.jpg"
'pbMap3.ImageLocation = "http://weather.yahoo.com/images/na_unitedstates_sw_outlookf_en_US_440_mdy_y.jpg"
Case 96701 To 96898
'pbMap2.ImageLocation = "http://weather.yahoo.com/images/hisat_440x297.jpg"
pbMap.ImageLocation = "http://weather.yahoo.com/images/us_hawaii_radar_medium_usen.jpg"
'pbMap3.ImageLocation = ""
Case 99501 To 99950
'pbMap2.ImageLocation = "http://weather.yahoo.com/images/aksat_440x297.jpg"
pbMap.ImageLocation = "http://weather.yahoo.com/images/us_alaska_radar_medium_usen.jpg"
'pbMap3.ImageLocation = ""
Case Else
MessageBox.Show("Please Enter a Valid Zip-Code.")
End Select
Catch ex As System.NullReferenceException
MessageBox.Show(ex.Message & "Please Enter a Valid Zip-Code.", "Info to the Rescue")
cmbZip.Focus()
End Try
End Sub
Private Function RetrieveHeatIndex(ByVal h As Long) As String
'Code by RSPercy 02/25/2010
'This is the more advanced version
Dim t As New YahooWeatherLib.YahooWeatherForecast(cmbZip.Text, "f")
Dim HEATINDEX As Long
'Heat Index Should be calculated only when air temperatures
'are greater than 80°F (27°C), dew point temperatures are
'greater than 60°F (16°C), and relative humidities are higher than 40%.
HEATINDEX = Math.Round(C1 + (C2 * AT) + (C3 * RH) - (C4 * AT * RH) + (C5 * (AT ^ 2)) + (C6 * (RH ^ 2)) + _
(C7 * (AT ^ 2) * RH) - (C8 * AT * (RH ^ 2)) + (C9 * (AT ^ 2) * (RH ^ 2)) - (C10 * (AT ^ 3)) + _
(C11 * (RH ^ 3)) + (C12 * (AT ^ 3) * RH) + (C13 * AT * (RH ^ 3)) - (C14 * (AT ^ 3) * (RH ^ 2)) + _
(C15 * (AT ^ 2) * (RH ^ 3)) - (C16 * (AT ^ 3) * (RH ^ 3)))
h = HEATINDEX
If h < AT Or AT < 80 Then
h = AT
End If
'Wind Chill Should only be calculated when temperatures
'are at or below 50°F and wind speeds are above 3 MPH. Bright
'sunshine may increase the wind chill temperature by 10°F to 18°F.
If AT <= 50 And t.rss.channel.wind.speed > 3 Then
h = t.rss.channel.wind.chill
End If
If AT <= 50 And t.rss.channel.wind.speed <= 3 Then
h = AT
End If
Return h
End Function
Private Function GetCondition(ByVal strCondition As String) As String
'Code by RSPercy 02/25/2010
Dim strPath As String = GetFolderPath(SpecialFolder.MyPictures) & "\YahooWeatherPics\"
Dim t As New YahooWeatherLib.YahooWeatherForecast(cmbZip.Text, "f")
Select Case t.rss.channel.item.condition.codeEnum
'Retrieve the codeEnum
'Set strCondition to the current weather condition
'Add a pic of the current weather condition
Case 0
strCondition = "Tornado"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/1d.png"
Case 1
strCondition = "Tropical Storm"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/1d.png"
Case 2
strCondition = "Hurricane"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/2d.png"
Case 3
strCondition = "Severe Thunderstorms"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/3d.png"
Case 4
strCondition = "Thunderstorms"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/4d.png"
Case 5
strCondition = "Mixed Rain and Snow"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/5d.png"
Case 6
strCondition = "Mixed Rain and Sleet"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/6d.png"
Case 7
strCondition = "Mixed Snow and Sleet"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/7d.png"
Case 8
strCondition = "Freezing Drizzle"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/8d.png"
Case 9
strCondition = "Drizzle"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/9d.png"
Case 10
strCondition = "Freezing Rain"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/10d.png"
Case 11
strCondition = "Showers"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/11d.png"
Case 12
strCondition = "Showers"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/12d.png"
Case 13
strCondition = "Snow Flurries"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/13d.png"
Case 14
strCondition = "Light Snow Showers"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/14d.png"
Case 15
strCondition = "Blowing Snow"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/15d.png"
Case 16
strCondition = "Snow"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/16d.png"
Case 17
strCondition = "Hail"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/17d.png"
Case 18
strCondition = "Sleet"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/18d.png"
Case 19
strCondition = "Dust"
'If lblDay1.Text = "Today" Then
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/19d.png"
'Else
'pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/19n.png"
'End If
Case 20
strCondition = "Foggy"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/20d.png"
Case 21
strCondition = "Haze"
'If lblDay1.Text = "Today" Then
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/21d.png"
'Else
'pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/21n.png"
'End If
Case 22
strCondition = "Smoky"
'If lblDay1.Text = "Today" Then
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/22d.png"
'Else
'pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/22n.png"
'End If
Case 23
strCondition = "Blustery"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/23d.png"
Case 24
strCondition = "Windy"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/24d.png"
Case 25
strCondition = "Cold"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/25d.png"
Case 26
strCondition = "Cloudy"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/26d.png"
Case 27
strCondition = "Mostly Cloudy" 'Night
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/27n.png"
Case 28
strCondition = "Mostly Cloudy"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/28d.png"
Case 29
strCondition = "Partly Cloudy" 'Night
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/29n.png"
Case 30
strCondition = "Partly Cloudy"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/30d.png"
Case 31
strCondition = "Clear Night"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/31n.png"
Case 32
strCondition = "Sunny"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/32d.png"
Case 33
strCondition = "Fair" 'Night
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/33n.png"
Case 34
strCondition = "Fair"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/33d.png"
Case 35
strCondition = "Mixed Rain and Hail"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/35d.png"
Case 36
strCondition = "Hot"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/36d.png"
Case 37
strCondition = "Isolated Thunderstorms"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/37d.png"
Case 38
strCondition = "Scattered Thunderstorms" 'Light
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/38d.png"
Case 39
strCondition = "Scattered Thunderstorms" 'Heavy
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/39d.png"
Case 40
strCondition = "Scattered Showers"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/40d.png"
Case 41
strCondition = "Heavy Snow"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/41d.png"
Case 42
strCondition = "Scattered Snow Showers"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/42d.png"
Case 43
strCondition = "Heavy Snow"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/43d.png"
Case 44
strCondition = "Partly Cloudy"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/30d.png"
Case 45
strCondition = "Thundershowers" 'Night
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/45d.png"
Case 46
strCondition = "Snow Showers" 'Night
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/46d.png"
Case 47
strCondition = "Isolated Thundershowers" 'Night
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/47d.png"
Case 3200
strCondition = "Not Available"
pbCondition.ImageLocation = "http://l.yimg.com/a/i/us/nws/weather/gr/44d.png"
End Select
Return strCondition
End Function
Private Sub OpentextFile(ByVal fname As String)
Dim fs As FileStream
Dim sr As StreamReader
Dim strFile As String
Try
fs = New FileStream(fname, FileMode.Open, FileAccess.Read)
sr = New StreamReader(fs)
strFile = sr.ReadLine()
Do Until strFile Is Nothing
cmbZip.Items.Add(strFile)
strFile = sr.ReadLine()
Loop
fs.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Private Sub ClearTextFields()
lblHeatIndexWindChill.Text = String.Empty
lblVisibility.Text = String.Empty
lblHumidity.Text = String.Empty
lblDewPoint.Text = String.Empty
lblPressure.Text = String.Empty
lblHi.Text = String.Empty
lblLow.Text = String.Empty
lblSunrise.Text = String.Empty
lblSunset.Text = String.Empty
lblDate.Text = String.Empty
lblCondition.Text = String.Empty
lblLocation.Text = String.Empty
End Sub
Private Sub cmbZip_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbZip.SelectedIndexChanged
btnGo.PerformClick()
End Sub
End Class