请教下各位大侠,我知道怎么用xmlhttp下载文本文档,可是像图片这样的该如何下载呢?
谢啦~
解决方案 »
- VB这个记录集如何判断··
- 如何根据hWnd得到对像的引用? 如何根据对像名得到对像的引用? VB消息处理的机制?
- 请帮忙解决:没有注册类别 dtspkg.dll
- 网络问题?急
- 小弟在XP系统下做了个小系统,现在用上了Window2000,再运行时出错,在Trim函数处提示编译错误(找不到工程或库),请问高手如何解决?
- 请问如何在一个Form中画图!
- 如何在文本中提取数据?
- msador15.dll是作什么用的?
- MSVBVM6.0 是何物?为何我的程序在其他的机子上不能运行? 如何解决 ? 在线等待!!!!!!!
- 如果版主替别人结旧贴,我认为侵犯了别人的权利,鄙人将退出CSDN.
- 解决picture控件大小问题
- 请各位高手帮助改一段代码(以适应自治函数的套嵌计算,谢谢!!!)
'建立一个vb工程,Project1
'添加引用:scripting runtime,Microsoft ActiveData 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.hao123.com/images/logox3.gif", True
Set d = New Class1
a.onreadystatechange = d
a.send
End Sub
''Class1代码:
Dim b As ADODB.Stream
Dim fso As Scripting.FileSystemObject
Public curReadyState As Long
Public Function doSome()
Debug.Print Form1.a.readyState
If Form1.a.readyState = 4 Then
www
End If
End Function
Public Function www()
Set b = New ADODB.Stream
b.Type = 1
b.open
Set fso = New Scripting.FileSystemObject
If Form1.a.readyState = 4 Then
b.Write (Form1.a.responseBody)
If Not fso.FileExists("c:\mmm.gif") Then
b.SaveToFile "c:\mmm.gif"
End If
End If
b.Close
Set b = Nothing
'
Set fso = Nothing
End Function
'到C盘找图片mmm.gif----实际就百度图标
''注意将Class1的doSome设置成default的!方法是
工具---->过程属性----选doSome---->高级-----过程标识符---->default---确定
'已经通过测试
能再问个问题么?
WshShell.Run """" & App.Path & """\reg.bat", 0, False这样,运行不了这个bat文件,请问,是怎么回事呢?怎样才能运行呢?
谢啦~
直接WshShell.Run App.Path & "\reg.bat", 0, False试下
对象‘Run’的方法‘IWshShell3’失败
Private Sub Command1_Click()
Set WshShell = CreateObject("Wscript.Shell")WshShell.Run "cmd /k " & App.Path & "\reg.bat"End Sub