بسم الله الرحمن الرحيم
الشرح ساهل جدا بالصوره :
الاكواد المطلوبه سوف نقوم بفتح نافذة الاكواد ونقم بمسح اي شي بداخلها ولصف الاكواد التاليه :
Public Class Form1
' كود احضار الصوره code imag
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Navigate("http://avatar.nimbuzz.com/getAvatar?jid=" & TextBox1.Text & "@nimbuzz.com")
End Sub
' save imag كود حفظ الصوره
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim saveDlg As New SaveFileDialog
saveDlg.Filter = "Image Files (*.bmp, *.jpg)|*.bmp;*.jpg"
If saveDlg.ShowDialog = DialogResult.OK Then
PictureBox1.Image.Save(saveDlg.FileName)
End If
End Sub
' كود اظهار الصوره في بيكتشر بوكس بدلا من الويب
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
Dim g As String = ""
For Each ele As HtmlElement In WebBrowser1.Document.All
If ele.GetAttribute("src").ToLower.Contains("") Then
Dim imgsrc As String = ele.GetAttribute("src")
g = imgsrc
End If
Next
PictureBox1.ImageLocation = g
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Close()
End
End Sub
End Class
كل كود معرفو عشان تبقا فاهم بتحط كود ايه
اتمنا لكم التوفيق