VB 使用Webbrowser控件下载图片 源码
2007-08-10 23:14
441 查看
Private Sub webSky_DownloadComplete()
On Error Resume Next
WebSky.Silent = True
Me.MousePointer = vbDefault
Dim x, CtrlRange
Dim sPath As String
sPath = App.Path
sPath = Left(sPath, InStr(sPath, vbNullChar) - 1)
If Len(sPath) > 3 Then sPath = sPath & "/"
If Trim(txtUser.Text) <> "" Then
gstrFileName = sPath & Trim(txtUser.Text) & "Code.bmp"
Else
gstrFileName = sPath & "TempCode.bmp"
End If
For Each x In WebSky.Document.All
If x.tagName = "IMG" Then
WebSky.Stop
Set CtrlRange = WebSky.Document.body.createControlRange()
CtrlRange.Add (x)
CtrlRange.execCommand ("Copy")
SavePicture Clipboard.GetData, gstrFileName
'getCodeForSky
End If
End If
Next
End Sub
On Error Resume Next
WebSky.Silent = True
Me.MousePointer = vbDefault
Dim x, CtrlRange
Dim sPath As String
sPath = App.Path
sPath = Left(sPath, InStr(sPath, vbNullChar) - 1)
If Len(sPath) > 3 Then sPath = sPath & "/"
If Trim(txtUser.Text) <> "" Then
gstrFileName = sPath & Trim(txtUser.Text) & "Code.bmp"
Else
gstrFileName = sPath & "TempCode.bmp"
End If
For Each x In WebSky.Document.All
If x.tagName = "IMG" Then
WebSky.Stop
Set CtrlRange = WebSky.Document.body.createControlRange()
CtrlRange.Add (x)
CtrlRange.execCommand ("Copy")
SavePicture Clipboard.GetData, gstrFileName
'getCodeForSky
End If
End If
Next
End Sub
相关文章推荐
- webBrowser控件(浏览器)的简单使用及源码下载
- VB编程必备!_VB源码之友(内含-下载-破解-使用方法)
- vb源码webbrowser如何保存网页上图片(按图片链接查找)
- Control Study->AdRotator广告控件显示自定义配置文件中广告以及与DataGrid控件结合使用显示图片(示例代码下载)
- 使用WebBrowser控件获取网页源码的方法
- Control Study->AdRotator广告控件显示自定义配置文件中广告以及与DataGrid控件结合使用显示图片(示例代码下载)
- 在VB中使用IE的 WebBrowser控件改进界面设计
- 如何控制WebBrowser控件不下载图片
- vb.net使用WebBrowser浏览器控件自制浏览器的相关技术
- VB自动登陆网络站点详解(二):Inet控件与WebBrowser控件配合使用
- 使用jquery与图片美化checkbox和radio控件的代码(打包下载)
- 【转】介绍vb使用xmlhttp对象、webbrowser控件、inet控件进行Post发包、Get发包的方法
- vb上传下载控件Inet-FTP使用大全
- VB使用WebBrowser控件POST数据
- Volley下载网络图片使用步骤级相关源码
- iOS 5 编程(1)-图像视图、滑块和步进控件的使用(源码下载)
- VB源码之友2006正式发布了,欢迎大家下载使用
- asp.net(VB)中使用正则获取图片地址并进行下载.
- 使用 CSS3 实现 3D 图片滑块效果【附源码下载】
- Control Study->AdRotator广告控件显示自定义配置文件中广告以及与DataGrid控件结合使用显示图片(示例代码下载)