标题:用vb.net做的一个股票数据下载程序
只看楼主
xyxcc177
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:26
帖 子:197
专家分:1249
注 册:2017-7-8
结帖率:100%
 问题点数:0 回复次数:3 
用vb.net做的一个股票数据下载程序
有新需求进一步完善。
setup.rar (468.05 KB)
搜索更多相关主题的帖子: vb.net 票数 需求 
2018-03-11 14:30
陈亮丹顿
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2018-3-23
得分:0 
作的不错,开源一下代码,让大家学习一下就更好了。
2018-03-23 23:16
不说也罢
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:贵宾
威 望:39
帖 子:1481
专家分:4989
注 册:2007-10-7
得分:0 
我下载了,先学习下。

——————非源码,又删了

===================================================
讨厌C#的行尾的小尾巴;和一对大括号{ }
===================================================
2018-03-24 16:33
xyxcc177
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:26
帖 子:197
专家分:1249
注 册:2017-7-8
得分:0 
程序代码:

 Private Sub GetImage(ByVal strUrl As String, ByVal Pict As PictureBox) '显示网上图片程序
        Try
            Dim request As HttpWebRequest = WebRequest.Create(strUrl)
            request.Timeout = 20000
            request.ServicePoint.ConnectionLimit = 100
            request.ReadWriteTimeout = 30000
            request.Method = "GET"
            Dim response As HttpWebResponse = request.GetResponse()
            If (response.StatusCode <> HttpStatusCode.OK) Then
                Exit Sub
            End If
            Dim resStream As Stream = response.GetResponseStream()
            Pict.Image = New Bitmap(resStream) '这个是winform中的控件
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub

 Private Sub WebBrowser1_DocumentCompleted(sender As Object, e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted  '用webbrowser控件解析表格数据
        Try
            bk_tity += 1
        If bk_tity = 5 Then
            Dim j As Int16 = 0
            bk_tity = 0
            hy_Table.Clear()
            Dim tr_arr As HtmlElementCollection
            Dim k As Int16
            Dim sVal_1 As HtmlElement
            Dim sVal As HtmlElement
            tr_arr = WebBrowser1.Document.GetElementsByTagName("table")(0).GetElementsByTagName("tr")
                Dim ct As Int16 = tr_arr.Count - 1
            For Each sVal_1 In tr_arr
                    If j > 0 And j < ct Then
                        k = 0
                        Dim dRow As DataRow = hy_Table.NewRow
                        For Each sVal In sVal_1.GetElementsByTagName("td")
                            dRow(k) = sVal.OuterText
                            k = k + 1
                        Next
                        hy_Table.Rows.Add(dRow)
                    End If
                j += 1
            Next

        End If
        Catch ex As Exception

        End Try
    End Sub




其它没有什么了
2018-03-31 14:06



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-485161-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.055320 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved