VB中如何提取WebBrowser1图片添加到Image1

VB中如何提取WebBrowser1验证码到Image1PrivateSubForm_Load()WebBrowser1.Navigate"http://aq.qq.co... VB中如何提取WebBrowser1验证码到Image1

Private Sub Form_Load()
WebBrowser1.Navigate "http://aq.qq.com/cn/findpsw/findpsw_index"
End Sub
比如我需要把http://aq.qq.com/cn/findpsw/findpsw_index的验证码填加到Image1的话改怎么做?..
展开
 我来答
百度网友d4f370c7e
2010-02-03 · TA获得超过2676个赞
知道小有建树答主
回答量:3606
采纳率:100%
帮助的人:1682万
展开全部
'//放在form的通用处.
Private Type TGUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0 To 7) As Byte
End Type

'// 用来加载Internet上的图片
Private Declare Function OleLoadPicturePath Lib "oleaut32.dll" (ByVal szURLorPath As Long, ByVal punkCaller As Long, ByVal dwReserved As Long, ByVal clrReserved As OLE_COLOR, ByRef riid As TGUID, ByRef ppvRet As IPicture) As Long

'// 从Internet上加载图片
Public Function LoadPicture(ByVal strFileName As String) As Picture
Dim IID As TGUID
With IID
.Data1 = &H7BF80980
.Data2 = &HBF32
.Data3 = &H101A
.Data4(0) = &H8B
.Data4(1) = &HBB
.Data4(2) = &H0
.Data4(3) = &HAA
.Data4(4) = &H0
.Data4(5) = &H30
.Data4(6) = &HC
.Data4(7) = &HAB
End With

On Error GoTo LocalErr

OleLoadPicturePath StrPtr(strFileName), 0&, 0&, 0&, IID, LoadPicture
Exit Function
LocalErr:
Set LoadPicture = VB.LoadPicture(strFileName)
Err.Clear
End Function

用法与vb的loadpicture一样.
image.picture=loadpicture("https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-zhidao.gif")

0回答者: zsmoto
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式