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
Ïà¹ØÎÊ´ð£º
ΪʲôÎÒÓÃform.showºÍform.hide¶à´ÎÁ¬½ÓÁËÁ½¸ö´°¿ÚÖ»ÄÜ»¥»»Á´½ÓÁ½´Î°¡£¿
´úÂë¿´¿´
ÕÕµÀÀíform.show û´ÎÊýÏÞ¶¨µÄ°É
ÎÒÒ²¿ì·èÁË¡£
Â¥Ö÷ÖªµÀÔõô·¢Ìùô£¿
ÒýÓÃ
ÎÒÒ²¿ì·èÁË¡£
Â¥Ö÷ÖªµÀÔõô·¢Ìùô£¿
Â¥Ö÷Ò² ......
ÔÚvbÖÐÈçºÎ¶ÁÈ¡WordÄÚÈÝ(°üº¬±í¸ñ£¬Í¼Æ¬£¬µÈ£©
¾¹È»²»ÊÇzero¡£
²»ÖªµÀÔõôʵÏֵIJ»ÒªËµ»°
Õâ¸öÖ»ÄܶÁÎı¾,
VB code:
Private Sub Command1_Click()
Dim WordApp As Object
Set WordApp = CreateObject(& ......
vbÖÐ ÏÖÔÚÎÒÒª°ÑÊý¾Ý¿âÀï´æ´¢µÄÒ»¸ö¸½¼þµÄÄÚÈÝÌæ»»ÁË£¬Ôõô×ö£¬Ö»ÊÇÌæ»»ÎÒÖ¸¶¨µÄλÖ㬲»ÊÇÈ«²¿Ìæ»»
Ç뽫ÎÊÌâ˵Ã÷°×£¬´æ´¢×ֶθñʽ£¬Èç¹ûÊÇBinary¸ñʽµÄ±È½ÏÂé·³£¬Èç¹ûÊÇ×Ö´®£¬Ö±½ÓÌæ»»¡£×îºÃ²»Òª½øÐÐÖ¸¶¨Î»ÖÃÌæ»»¡ ......
dim a as string,b as string£¬c as string
a="¹¤³Ì±àºÅ,µ¥Î»¹¤³ÌÃû³Æ,·Ö²¿¹¤³Ì±àºÅ"
b="µ¥Î»¹¤³ÌÃû³Æ"
c="µ¥Î»"
Ôõô²ÅÄÜÅжϳöa×Ö·û´®ÖдæÔÚb×Ö·û´®£¬¶ø²»´æÔÚc×Ö·û´®
¿´¿´i ......
ÈçÌ⣬VBÖÐÈçºÎʵÏÖÒ»PC¿ØÖÆN̨PC»úµÄ¿ª¹Ø»ú»òÕßÆäËûÃüÁîÄØ£¿
Õâ¸öÎÊÌâÓеã´óŶ.Èç²»ÄÜÔÚÆäËü»úÆ÷ÉÏÒ²×°³ÌÐòµÄ»°,ÄÇÖ»Òª¿´ËûÃÇÓÐûÅäÖÃÓÐÔ¶³Ì¿ØÖÆ¿ª¹Ø»úÁË
Èç¹ûÊÇÄÇÖÖ¿Í»§/·þÎñ¶ËµÄ·½Ê½ £¬¾ÍÊDZ»¿ØÖÆPCÒ²ÐèÒª°²× ......