Go Back   Gaming Gutter > Non-Gaming > Programming > Source Code


Source Code - Have a source code/project files you want to post? Do so here.

» Site Navigation
» Home
» FAQ
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Advertisement
» Recent Threads
Go to first new post Ruzzykinz.
Today 06:14 PM
Last post by Ruzzeh
Today 06:32 PM
23 Replies, 67 Views
Go to first new post Lenny Conundrum
02-09-2007 11:09 AM
by Noodle
Last post by G.I.R.
Today 06:23 PM
740 Replies, 34,723 Views
Go to first new post Whats your favorite...
08-06-2008 08:59 PM
Last post by Mirage
Today 06:18 PM
109 Replies, 841 Views
Go to first new post I feel like shit.
Yesterday 10:49 PM
Last post by Zombii
Today 06:18 PM
28 Replies, 166 Views
Go to first new post Anglo-Saxon Riddles
Today 05:53 PM
by Fewmitz
Last post by Fewmitz
Today 06:16 PM
2 Replies, 14 Views
Reply
 
LinkBack Thread Tools Display Modes

 Weather Thing Source
Old 12-17-2007, 11:12 PM   #1 (permalink)
Full Member

PhearAlmighty is offline
 
Join Date: Nov 2007
Posts: 21
GPoints: 75
iTrader: 0 / 0%
PhearAlmighty Is gaining popularity
Rep Power: 0
Weather Thing Source

Just showing I can do shit.

Allows the user to enter a zip code then gets the weather, current temp, and feels like temp from weather.com

Code:
Dim strHTML As String
Private Sub Command1_Click()
If LenB(Text1.Text) <> 0 Then
Dim weather As String
Dim curTemp As String
Dim FeelsLike As String
    'get weather.com info
    strHTML = wrapper.GetWrapper("http://www.weather.com/weather/local/" & Text1.Text, "http://www.weather.com/")
        'get weather
        weather = iBetween(strHTML, "ALT=><BR><B CLASS=obsTextA>", "</B></TD>")
        weather = "Current Weather: " & vbNewLine & weather
        If weather = "Current Weather: " & vbNewLine Then weather = "Current Weather: "
        lblWeather.Caption = weather
            'get current temp
            curTemp = iBetween(strHTML, "<B CLASS=obsTempTextA>", "&deg;")
            curTemp = "Current Temp: " & curTemp & ChrW$(176)
            If curTemp = "Current Temp: " & ChrW$(176) Then curTemp = "Current Temp: "
            lblTemp.Caption = curTemp
                'get feels like temp
                FeelsLike = iBetween(strHTML, "Feels Like<BR> ", "&deg;")
                FeelsLike = "Feels Like: " & FeelsLike & ChrW$(176)
                If FeelsLike = "Feels Like: " & ChrW$(176) Then FeelsLike = "Feels Like: "
                lblFeel.Caption = FeelsLike
Else
MsgBox "Insert a ZIP Code!", , "Weather Center"
Exit Sub
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
wrapper.ClearCookies
wrapper.StopIT = True
Call EndIt
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii <> 8 Then
    If KeyAscii <> 9 Then
        If KeyAscii < 48 Then KeyAscii = 0
            If KeyAscii > 57 Then KeyAscii = 0
                Else: Exit Sub
End If: End If
End Sub
  Reply With Quote
Reply

Bookmarks



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -7. The time now is 06:32 PM.


vBulletin skin developed by: eXtremepixels
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The contents of this webpage are copyright © 2006-2008 GamingGutter.com. All Rights Reserved.

Page generated in 0.10416698 seconds (100.00% PHP - 0% MySQL) with 19 queries