[Resolved]code for vb6 from vb.net
ive searching for an hour but i can find it.or maybe i found it but i didnt know..:D
this code is from vb.net
on webbrowser document complete.
Dim sImage As String
sImage = WebBrowser1.Document.All("avatar").GetAttribute("src")
PictureBox1.ImageLocation = sImage
"avatar" this is the name tag of html (name="avatar")
"scr" this is the link of the image ex: scr="imagelink.jpg"
i just want to know,what is the code for vb6?
how to get attribute?
thanks...
Re: code for vb6 from vb.net
This should work.
Code:
Private Sub Command1_Click()
Dim ie
Dim strSrc As String
Dim srtURL As String
Dim strAttribValue As String
'Add correct values
strURL = "www.google.com"
strAttribValue = "logo"
Set ie = CreateObject("internetexplorer.application")
ie.navigate strURL
Do While ie.ReadyState < 4 'READYSTATE_COMPLETE
DoEvents
Loop
strSrc = ie.Document.getElementById(strAttribValue).getAttribute("src")
Debug.Print strSrc
Set ie = Nothing
End Sub
Re: code for vb6 from vb.net
works like a charm..hehehe...
thanks Markt..
thread resolved...