VB µ÷ÓÃInet¿Ø¼þÏÂÔسö´í - VB / ÍøÂç±à³Ì
¸÷λ¸ßÊÖ£¬Ð¡µÜ×î½üÅöµ½Ò»¸öÎÊÌ⣺ÔÏÈдµÄ³ÌÐò´ó¸ÅµÄ˼·ÊÇ£ºÊ×ÏÈwebbrowser´ò¿ªÍøÖ·£¬ÍøÖ·ÏÔʾºó£¬µã»÷ÍøÖ·ÉϵÄijһ¸öÁ¬½Ó£¬µ±webbrowser¼ì²âµ½ÍøÖ·ÒѾÁ¬½Óµ½ÏëÒªµÄµØַʱºò¾Í¿ªÊ¼ÏÂÔØÎļþ£¬µ±ÓÃIE6µÄʱºòÏÂÔØÊÇÕý³£µÄ£¬Content-TypeÊÇÕýÈ·µÄ,ÊÇImage/jpeg;µ«ÊÇÒ»µ©ÏµÍ³µÄIE°æ±¾ÊÇ7»òÕß8µÄʱºò£¬ÏÂÔؾͻá³ö´í£¬Content-Type¾Í»á³ö´í£¬»áÈ«²¿±ä³ÉHtml,È«²¿ÊÇÍøÒ³¸ñʽµÄ£¬ÏÂÔسö´í£¡
Õæ²»ÖªµÀÕâÊÇʲôÎÊÌ⣬¸ßÊÖ¸øÖ¸µ¼Ò»Ï£¡Ð»Ð»£¡£¡£¡
ÔõôûÓÐÈË»ØÄØ£¿
'State = 12 ʱ£¬Óà GetChunk ·½·¨¼ìË÷·þÎñÆ÷µÄÏìÓ¦¡£
Dim RetCode As Long
Dim vtData() As Byte
Select Case State
'...ûÓÐÁоÙÆäËüÇé¿ö¡£
Case icError '11
'³öÏÖ´íÎóʱ£¬·µ»Ø ResponseCode ºÍ ResponseInfo¡£
vtData = inet1.ResponseCode & ":" & inet1.ResponseInfo
Case icResponseCompleted ' 12
Dim bDone As Boolean: bDone = False
'È¡µÃµÚÒ»¸ö¿é¡£
vtData() = inet1.GetChunk(1024, 1)
DoEvents
Open SavePathTemp For Binary Access Write As #1 'ÉèÖñ£´æ·¾¶Îļþºó¿ªÊ¼±£´æ
If Len(inet1.GetHeader("Content-Length")) > 0 Then ProDown.Max = CLng(inet1.GetHeader("Content-Length"))
'Ñ»··Ö¿éÏÂÔØ
Do While Not bDone
Put #1, Loc(1) + 1, vtData()
vtData() = inet1.GetChun
Ïà¹ØÎÊ´ð£º
ÔÚÏÂÊÇvbµÄÐÂÊÖ£¬Ïëд¶Î³ÌÐò£¬ÔÚvbÖУ¬Ê¹ÓÃwscriptµ÷ÓÃһЩÍⲿµÄÃüÁµ«ÊdzÌÐòÖ´ÐÐÒ»Ö±ÓдíÎó£¬Çë¸÷λ¸ßÊÖ°ïæ½â´ðÏ£¬Ð»Ð»¡£
´úÂëÈçÏ£º
VB code:
Private Function getFile_CMD(filename, filepath) As Bo ......
ÎÒÔÚÀàÖÐÓÐÒ»¸öº¯Êý
Public Function DownloadAdditionalSite(SiteName As siteconfig, Directory As String, ymd As String) As Boolean
siteconfigÊÇÎÒ×Ô¶¨ÒåÀàÐ͵ÄÊý¾Ý£¬ÎªÊ²Ã´»áÌáʾ¡°Ö»ÓÐÔÚ¹«¹²¶ÔÏóÄ£¿éÖж ......
ÏÖÔÚÎÒÏë¸ù¾ÝtreeviewÉÏÿ¸ö½ÚµãµÄȨÏÞ£¬Ã»ÓÐȨÏ޵Ľڵ㲻Äܱ»Ñ¡ÖУ¬¶øÇҳɻÒÉ«£¬ÔõôʵÏÖ£¬ÔÚÏߵȡ£¡£¡£
Õâ¸ö£¿¡£¡£¡£
òËÆû·¨¡£
ÊÔÊÔÄܲ»ÄܸÄijЩnodeµÄÑÕÉ«£¬¼Ç¼ÏÂÉϴεÄnodeclickÀïµÄnode¡£
Ï´εã»÷µÄÈç¹ ......
ÎÒÏë°ÑwordÁí´æΪxmlÖ®ºó£¬ÓÃvb¶ÁÈ¡Õâ¸öxmlµÄÄÚÈÝ£¬ÇëÎÊÈçºÎʵÏÖ£¿
dim f as integer
dim b() as byte
dim s as string
dim L as long
f=freefile()
open "abc.xml" for binary access read as #f
......