只贴3张图~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vb.net吧
全部回复
仅看楼主
level 1
bslwjf 楼主
完成了60%了,休息一下,贴3张图~~~~~~~~~~~~~~~~~~~~~~

2012年03月03日 09点03分 1
level 5
我想知道 那个温度 怎的得到的?
2012年07月22日 15点07分 2
那个温度是一个Rss。其他的推送消息也都是rss
2012年07月23日 16点07分
@bslwjf 能能教教我吗?
2012年07月24日 00点07分
@771911064 很多网站和天气网站都有RSS。你可以先用.net读取Rss,然后把想要的数据从Rss读出来写到控件的tag里。也可以用time控件循环读取。这样过一段时间就会自动更新。。。
2012年07月24日 02点07分
level 5
怎么读取?
2012年07月24日 06点07分 3
用 WebRequest 可以读取网页源码。
2012年07月24日 16点07分
level 1
bslwjf 楼主
@771911064
Private Function Rss2()
On Error Resume Next
Dim tempStr As String
Dim np1() As String
Dim np2() As String
Dim np3() As String
Dim tempstr2, tempstr3, tempstr4, tempstr5 As String Dim request As WebRequest = WebRequest.Create(l_tlist_Rss(i3).tag)
request.Timeout = 5000
Dim response As WebResponse = request.GetResponse()
Dim stream As IO.Stream = response.GetResponseStream()
Dim sr As StreamReader = New StreamReader(stream, Encoding.GetEncoding("utf-8"))
tempStr = sr.ReadToEnd
request.Abort()
'------------分离编码类型-------------
np1 = Split(tempStr, "encoding=""")
Dim tempTTT As String = np1(1)
np1 = Split(tempTTT, """")
'------------如果编码不对则重新读取解码------------
If np1(0).ToLower() <> "utf-8" Then
Dim request2 As WebRequest = WebRequest.Create(l_tlist_Rss(i3).tag)
request2.Timeout = 5000
Dim response2 As WebResponse = request2.GetResponse()
Dim stream2 As IO.Stream = response2.GetResponseStream()
Dim sr2 As StreamReader = New StreamReader(stream2, Encoding.GetEncoding(np1(0)))
tempStr = sr2.ReadToEnd
request2.Abort()
End If np1 = Split(tempStr, "<item") For s = 1 To UBound(np1) - 1
'---标题----
np2 = Split(np1(s), "<title>")
np3 = Split(np2(1), "</title>")
tempstr2 = np3(0)
'---地址----
np2 = Split(np1(s), "<link>")
np3 = Split(np2(1), "</link>")
tempstr3 = np3(0)
'----详细-----
np2 = Split(np1(s), "<description>")
np3 = Split(np2(1), "</description>")
tempstr4 = np3(0) If tempstr5 = "" Then
tempstr5 = tempstr2 & "||" & tempstr3 & "||" & tempstr4
Else
tempstr5 = tempstr5 & "|s|" & tempstr2 & "||" & tempstr3 & "||" & tempstr4
End If
Next Rsstc = tempstr5 Me.Invoke(New VoidDelegate(AddressOf RSSadd))
End Function
2012年07月24日 16点07分 4
1