Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- ' ----------------------------
- ' |Coded by 3a©roub 2013-2014|
- ' | Dev-point.com |
- ' | All right reserved ® |
- ' ----------------------------
- Private Sub Captcha()
- Dim Doc As mshtml.IHTMLDocument2 = WebBrowser1.Document.DomDocument
- Dim ImgRange As mshtml.IHTMLControlRange = CType(Doc.body, mshtml.HTMLBody).createControlRange
- For Each Img As mshtml.IHTMLImgElement In Doc.images
- If Img.GetAttribute("src").ToString.Contains("http://www.afreesms.com/image.php") Then
- ImgRange.add(Img)
- ImgRange.execCommand("Copy", False, Nothing)
- PictureBox1.Image = Clipboard.GetDataObject.GetData(DataFormats.Bitmap)
- Exit For
- End If
- Next
- End Sub
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Call Captcha()
- End Sub
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- WebBrowser1.Navigate("http://www.afreesms.com/freesms/")
- End Sub
- Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
- If WebBrowser1.ReadyState = WebBrowserReadyState.Complete Then
- Button1.Enabled = True
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement