vb中利用xmlhttp来下载远程文件

这篇博客介绍了如何在Visual Basic (VB) 中利用XMLHTTP组件下载远程文件。文章通过一系列步骤和代码示例详细讲解了从URL获取文件内容并保存到本地的过程。
摘要由CSDN通过智能技术生成
建立一个vb工程,Project1
添加引用:Microsoft scripting runtime,Microsoft Active Data Object,Microsoft MsXml

Form1代码:

   Public a As MSXML2.XMLHTTP
  

Private Sub Command1_Click()
   Dim d As Class1
   Set a = New MSXML2.XMLHTTP
   a.open "get", "http://www.ljc.com/sll.exe", True
   Set d = New Class1
   a.onreadystatechange = d
   a.send
End Sub

Class1代码:

http://www.huihui.cn/share/22816094
http://www.huihui.cn/share/22817262
http://www.huihui.cn/share/22818208
http://www.huihui.cn/share/22818890
http://www.huihui.cn/share/22819708
http://www.huihui.cn/share/22820702
http://www.huihui.cn/share/22821356
http://www.huihui.cn/share/22822272
http://www.huihui.cn/share/22823582
http://www.huihui.cn/share/22824514
http://www.huihui.cn/share/22826214
http://www.huihui.cn/share/22826978
http://www.huihui.cn/share/22828316
http://www.huihui.cn/share/22829010
http://www.huihui.cn/share/22829882
http://www.huihui.cn/share/22830618
http://www.huihui.cn/share/22832144
http://www.huihui.cn/share/22833882
http://www.huihui.cn/share/22836058
http://www.huihui.cn/share/22836760
http://www.huihui.cn/share/22837538
http://www.huihui.cn/share/22838152
http://www.huihui.cn/share/22839394
http://www.huihui.cn/share/22840038
http://www.huihui.cn/share/22840938
http://www.huihui.cn/share/22841594
http://www.huihui.cn/share/22843744
http://www.huihui.cn/share/22844406
http://www.huihui.cn/share/22845272
http://www.huihui.cn/share/22845886
http://www.huihui.cn/share/22854348
http://www.huihui.cn/share/22856142
http://www.huihui.cn/share/22857250
http://www.huihui.cn/share/22858236
http://www.huihui.cn/share/22859114
http://www.huihui.cn/share/22859950
http://www.huihui.cn/share/22860818
http://www.huihui.cn/share/22861690
http://www.huihui.cn/share/22862272
http://www.huihui.cn/share/22862940
http://www.huihui.cn/share/22874304
http://www.huihui.cn/share/22875506
http://www.huihui.cn/share/22876142
http://www.huihui.cn/share/22877058
http://www.huihui.cn/share/22877688
http://www.huihui.cn/share/22878300
http://www.huihui.cn/share/22903918
http://www.huihui.cn/share/22904572
http://www.huihui.cn/share/22905394
http://www.huihui.cn/share/22906290
http://www.huihui.cn/share/22908096
http://www.huihui.cn/share/22908506
http://www.huihui.cn/share/22908896
http://www.huihui.cn/share/22909466
http://www.huihui.cn/share/22910148
http://www.huihui.cn/share/22911844
http://www.huihui.cn/share/22912302
http://www.huihui.cn/share/22912736
http://www.huihui.cn/share/22913244
http://www.huihui.cn/share/22913636
http://www.huihui.cn/share/22914242
http://www.huihui.cn/share/22917990
http://www.huihui.cn/share/22918154
http://www.huihui.cn/share/22918312
http://www.huihui.cn/share/22918438
http://www.huihui.cn/share/22919128
http://www.huihui.cn/share/22919382
http://www.huihui.cn/share/22919710
http://www.huihui.cn/share/22919826
http://www.huihui.cn/share/22920226
http://www.huihui.cn/share/22920442
http://www.huihui.cn/share/22920544
http://www.huihui.cn/share/22920640
http://www.huihui.cn/share/22920798
http://www.huihui.cn/share/22920912
http://www.huihui.cn/share/22921328
http://www.huihui.cn/share/22921558
http://www.huihui.cn/share/22921672
http://www.huihui.cn/share/22921824
http://www.huihui.cn/share/22921946
http://www.huihui.cn/share/22922416
http://www.huihui.cn/share/22922526
http://www.huihui.cn/share/22922592
http://www.huihui.cn/share/22922706
http://www.huihui.cn/share/22922876
http://www.huihui.cn/share/22923010
http://www.huihui.cn/share/22923086
http://www.huihui.cn/share/22923178
http://www.huihui.cn/share/22923306
http://www.huihui.cn/share/22923468
http://www.huihui.cn/share/22932682
http://www.huihui.cn/share/22933658
http://www.huihui.cn/share/22933948
http://www.huihui.cn/share/22934254
http://www.huihui.cn/share/22934582
http://www.huihui.cn/share/22934844
http://www.huihui.cn/share/22935186
http://www.huihui.cn/share/22935502
http://www.huihui.cn/share/22936140
http://www.huihui.cn/share/22936714
http://event.weibo.com/21570236
http://event.weibo.com/21572046
http://event.weibo.com/21572748
http://event.weibo.com/21573256
http://event.weibo.com/21573932
http://event.weibo.com/21574462
http://event.weibo.com/21574928
http://event.weibo.com/21575522
http://event.weibo.com/21576024
http://event.weibo.com/21576826
http://event.weibo.com/21578000
http://event.weibo.com/21578404
http://event.weibo.com/21582424
http://event.weibo.com/21583348
http://event.weibo.com/21583752
http://event.weibo.com/21584160
http://event.weibo.com/21584814
http://event.weibo.com/21585276
http://event.weibo.com/21585654
http://event.weibo.com/21586032
http://event.weibo.com/21586544
http://event.weibo.com/21586920
http://event.weibo.com/21587276
http://event.weibo.com/21587808
http://event.weibo.com/21590596
http://event.weibo.com/21591114
http://event.weibo.com/21591500
http://event.weibo.com/21591820
http://event.weibo.com/21592258
http://event.weibo.com/21592708
http://event.weibo.com/21593152
http://event.weibo.com/21594998
http://event.weibo.com/21595736
http://event.weibo.com/21596596
http://event.weibo.com/21597540
http://event.weibo.com/21600030
http://event.weibo.com/21604818
http://event.weibo.com/21605702
http://event.weibo.com/21606394
http://event.weibo.com/21606940
http://event.weibo.com/21607424
http://event.weibo.com/21607742
http://event.weibo.com/21608046
http://event.weibo.com/21608348
http://event.weibo.com/21608712
http://event.weibo.com/21609010
http://event.weibo.com/21609348
http://event.weibo.com/21609712
http://event.weibo.com/21611054
http://event.weibo.com/21615030
http://event.weibo.com/21615528
http://event.weibo.com/21616166
http://event.weibo.com/21616794
http://event.weibo.com/21617166
http://event.weibo.com/21617500
http://event.weibo.com/21617894
http://event.weibo.com/21620422
http://event.weibo.com/21620934
http://event.weibo.com/21621256
http://event.weibo.com/21621684
http://event.weibo.com/21627376
http://event.weibo.com/21627730
http://event.weibo.com/21628322
http://event.weibo.com/21628636
http://event.weibo.com/21628940
http://event.weibo.com/21629252
http://event.weibo.com/21629520
http://event.weibo.com/21629778
http://event.weibo.com/21630074
http://event.weibo.com/21630384
http://event.weibo.com/21630840
http://event.weibo.com/21632050
http://www.huihui.cn/share/22792138
http://www.huihui.cn/share/22792722
http://www.huihui.cn/share/22793418
http://www.huihui.cn/share/22793968
http://www.huihui.cn/share/22794604
http://www.huihui.cn/share/22795216
http://www.huihui.cn/share/22795988
http://www.huihui.cn/share/22796514
http://www.huihui.cn/share/22797250
http://www.huihui.cn/share/22797858
http://www.huihui.cn/share/22798652
http://www.huihui.cn/share/22799216
http://www.huihui.cn/share/22799718
http://www.huihui.cn/share/22800348
http://www.huihui.cn/share/22800902
http://www.huihui.cn/share/22801608
http://www.huihui.cn/share/22802222
http://www.huihui.cn/share/22802822
http://www.huihui.cn/share/22803386
http://www.huihui.cn/share/22803930
http://www.huihui.cn/share/22804538
http://www.huihui.cn/share/22805104
http://www.huihui.cn/share/22805604
http://www.huihui.cn/share/22806144
http://www.huihui.cn/share/22806712
http://www.huihui.cn/share/22807306
http://www.huihui.cn/share/22807874
http://www.huihui.cn/share/22808468
http://www.huihui.cn/share/22809000
http://www.huihui.cn/share/22810800
http://www.huihui.cn/share/22811480
http://www.huihui.cn/share/22812036
http://www.huihui.cn/share/22812826
http://www.huihui.cn/share/22813508
http://www.huihui.cn/share/22814772
http://www.huihui.cn/share/22815388
http://www.huihui.cn/share/22816032
http://www.huihui.cn/share/22816704
http://www.huihui.cn/share/22817408
http://www.huihui.cn/share/22818320
http://www.huihui.cn/share/22819124
http://www.huihui.cn/share/22819748
http://www.huihui.cn/share/22820580
http://www.huihui.cn/share/22821494
http://www.huihui.cn/share/22822082
http://www.huihui.cn/share/22822646
http://www.huihui.cn/share/22827120
http://www.huihui.cn/share/22827824
http://www.huihui.cn/share/22828582
http://www.huihui.cn/share/22829702
http://www.huihui.cn/share/22830300
http://www.huihui.cn/share/22833518
http://www.huihui.cn/share/22834160
http://www.huihui.cn/share/22836734
http://www.huihui.cn/share/22837318
http://www.huihui.cn/share/22837900
http://www.huihui.cn/share/22838596
http://www.huihui.cn/share/22839132
http://www.huihui.cn/share/22839762
http://www.huihui.cn/share/22840388
http://www.huihui.cn/share/22841036
http://www.huihui.cn/share/22841682
http://www.huihui.cn/share/22842212
http://www.huihui.cn/share/22842866
http://www.huihui.cn/share/22843518
http://www.huihui.cn/share/22844080
http://www.huihui.cn/share/22844778
http://www.huihui.cn/share/22845320
http://www.huihui.cn/share/22845948
http://www.huihui.cn/share/22847012
http://www.huihui.cn/share/22848076
http://www.huihui.cn/share/22849178
http://www.huihui.cn/share/22850850
http://www.huihui.cn/share/22851566
http://www.huihui.cn/share/22852906
http://www.huihui.cn/share/22854084
http://www.huihui.cn/share/22908748
http://www.huihui.cn/share/22909186
http://www.huihui.cn/share/22909594
http://www.huihui.cn/share/22910104
http://www.huihui.cn/share/22910746
http://www.huihui.cn/share/22911132
http://www.huihui.cn/share/22911520
http://www.huihui.cn/share/22911984
http://www.huihui.cn/share/22912360
http://www.huihui.cn/share/22912752
http://www.huihui.cn/share/22913140
http://www.huihui.cn/share/22913560
http://www.huihui.cn/share/22913952
http://www.huihui.cn/share/22914206
http://www.huihui.cn/share/22914480
http://www.huihui.cn/share/22914768
http://www.huihui.cn/share/22915066
http://www.huihui.cn/share/22915348
http://www.huihui.cn/share/22915688
http://www.huihui.cn/share/22916072
http://www.huihui.cn/share/22916470
http://www.huihui.cn/share/22916854
http://www.huihui.cn/share/22917270
http://www.huihui.cn/share/22917638
http://www.huihui.cn/share/22860578
http://www.huihui.cn/share/22859814
http://www.huihui.cn/share/22858420
http://www.huihui.cn/share/22857634
http://www.huihui.cn/share/22856912
http://www.huihui.cn/share/22856314
http://www.huihui.cn/share/22855718
http://www.huihui.cn/share/22855046
http://www.huihui.cn/share/22854306
http://www.huihui.cn/share/22853076
http://www.huihui.cn/share/22852324
http://www.huihui.cn/share/22851462
http://www.huihui.cn/share/22850602
http://www.huihui.cn/share/22849288
http://www.huihui.cn/share/22848600
http://www.huihui.cn/share/22847976
http://www.huihui.cn/share/22847330
http://www.huihui.cn/share/22846708
http://www.huihui.cn/share/22846080
http://www.huihui.cn/share/22845500
http://www.huihui.cn/share/22844976
http://www.huihui.cn/share/22844292
http://www.huihui.cn/share/22843592
http://www.huihui.cn/share/22842982
http://www.huihui.cn/share/22842264
http://www.huihui.cn/share/22841610
http://www.huihui.cn/share/22840992
http://www.huihui.cn/share/22840386
http://www.huihui.cn/share/22839756
http://www.huihui.cn/share/22839096
http://www.huihui.cn/share/22838476
http://www.huihui.cn/share/22837856
http://www.huihui.cn/share/22835598
http://www.huihui.cn/share/22835038
http://www.huihui.cn/share/22834478
http://www.huihui.cn/share/22833844
http://www.huihui.cn/share/22833148
http://www.huihui.cn/share/22832452
http://www.huihui.cn/share/22831750
http://www.huihui.cn/share/22831224
http://www.huihui.cn/share/22830534
http://www.huihui.cn/share/22830026
http://www.huihui.cn/share/22829472
http://www.huihui.cn/share/22828876
http://www.huihui.cn/share/22922224
http://www.huihui.cn/share/22918112
http://www.huihui.cn/share/22917928
http://www.huihui.cn/share/22917534
http://www.huihui.cn/share/22916848
http://www.huihui.cn/share/22916524
http://www.huihui.cn/share/22915618
http://www.huihui.cn/share/22914684
http://www.huihui.cn/share/22914312
http://www.huihui.cn/share/22914046
http://www.huihui.cn/share/22913708
http://www.huihui.cn/share/22913366
http://www.huihui.cn/share/22913016
http://www.huihui.cn/share/22912654
http://www.huihui.cn/share/22912244
http://www.huihui.cn/share/22911904
http://www.huihui.cn/share/22911410
http://www.huihui.cn/share/22910986
http://www.huihui.cn/share/22910566
http://www.huihui.cn/share/22910106
http://www.huihui.cn/share/22909616
http://www.huihui.cn/share/22909198
http://www.huihui.cn/share/22908728
http://www.huihui.cn/share/22908376
http://www.huihui.cn/share/22908050
http://www.huihui.cn/share/22907738
http://www.huihui.cn/share/22907358
http://www.huihui.cn/share/22907014
http://www.huihui.cn/share/22906520
http://www.huihui.cn/share/22906048
http://www.huihui.cn/share/22905596
http://www.huihui.cn/share/22905134
http://www.huihui.cn/share/22904652
http://www.huihui.cn/share/22904176
http://www.huihui.cn/share/22903704
http://www.huihui.cn/share/22903212
http://www.huihui.cn/share/22902566
http://www.huihui.cn/share/22879024
http://www.huihui.cn/share/22878378
http://www.huihui.cn/share/22877818
http://www.huihui.cn/share/22877114
http://www.huihui.cn/share/22875956
http://www.huihui.cn/share/22875400
http://www.huihui.cn/share/22874768
http://www.huihui.cn/share/22874248
http://www.huihui.cn/share/22873666
http://www.huihui.cn/share/22949782
http://www.huihui.cn/share/22949396
http://www.huihui.cn/share/22949022
http://www.huihui.cn/share/22947576
http://www.huihui.cn/share/22947196
http://www.huihui.cn/share/22946808
http://www.huihui.cn/share/22946402
http://www.huihui.cn/share/22946076
http://www.huihui.cn/share/22945736
http://www.huihui.cn/share/22945434
http://www.huihui.cn/share/22945018
http://www.huihui.cn/share/22944690
http://www.huihui.cn/share/22944360
http://www.huihui.cn/share/22943958
http://www.huihui.cn/share/22943656
http://www.huihui.cn/share/22943238
http://www.huihui.cn/share/22942940
http://www.huihui.cn/share/22942606
http://www.huihui.cn/share/22942290
http://www.huihui.cn/share/22941964
http://www.huihui.cn/share/22941604
http://www.huihui.cn/share/22941256
http://www.huihui.cn/share/22940974
http://www.huihui.cn/share/22940562
http://www.huihui.cn/share/22940160
http://www.huihui.cn/share/22939828
http://www.huihui.cn/share/22939278
http://www.huihui.cn/share/22938926
http://www.huihui.cn/share/22938612
http://www.huihui.cn/share/22938234
http://www.huihui.cn/share/22937894
http://www.huihui.cn/share/22937606
http://www.huihui.cn/share/22937274
http://www.huihui.cn/share/22936980
http://www.huihui.cn/share/22936658
http://www.huihui.cn/share/22936290
http://www.huihui.cn/share/22935946
http://www.huihui.cn/share/22935656
http://www.huihui.cn/share/22935332
http://www.huihui.cn/share/22935020
http://www.huihui.cn/share/22934762
http://www.huihui.cn/share/22934472
http://www.huihui.cn/share/22934132
http://www.huihui.cn/share/22933804
http://www.huihui.cn/share/22933472
http://event.weibo.com/21575248
http://event.weibo.com/21577260
http://event.weibo.com/21577936
http://event.weibo.com/21578410
http://event.weibo.com/21578948
http://event.weibo.com/21579566
http://event.weibo.com/21580214
http://event.weibo.com/21580880
http://event.weibo.com/21581538
http://event.weibo.com/21582244
http://event.weibo.com/21583276
http://event.weibo.com/21583984
http://event.weibo.com/21586554
http://event.weibo.com/21587906
http://event.weibo.com/21588364
http://event.weibo.com/21588754
http://event.weibo.com/21589454
http://event.weibo.com/21589994
http://event.weibo.com/21590332
http://event.weibo.com/21590726
http://event.weibo.com/21591108
http://event.weibo.com/21591550
http://event.weibo.com/21592102
http://event.weibo.com/21592502
http://event.weibo.com/21593774
http://event.weibo.com/21594588
http://event.weibo.com/21595364
http://event.weibo.com/21595954
http://event.weibo.com/21596740
http://event.weibo.com/21597232
http://event.weibo.com/21597658
http://event.weibo.com/21598092
http://event.weibo.com/21598830
http://event.weibo.com/21599538
http://event.weibo.com/21600182
http://event.weibo.com/21603234
http://event.weibo.com/21603730
http://event.weibo.com/21605432
http://event.weibo.com/21605948
http://event.weibo.com/21606532
http://event.weibo.com/21606998
http://event.weibo.com/21607468
http://event.weibo.com/21607774
http://event.weibo.com/21608142
http://event.weibo.com/21608478
http://event.weibo.com/21610434
http://event.weibo.com/21610846
http://event.weibo.com/21612574
http://event.weibo.com/21613328
http://event.weibo.com/21613846
http://event.weibo.com/21614642
http://event.weibo.com/21615098
http://eve

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值