06-02-21, 08:36 PM
(06-02-21, 08:21 PM)سعود كتب :
هل اصبت الهدف ام لااقصد هل هذا هو المطلوب؟
PHP كود :
Public Class Form1
Dim lst As New List(Of String)
Private Sub gd(url As String)
lst.Clear()
ListBox1.Invoke(Sub() ListBox1.Items.Clear())
Dim h As New HtmlAgilityPack.HtmlWeb
Dim d As HtmlAgilityPack.HtmlDocument = h.Load(url, "Get")
For Each n As HtmlAgilityPack.HtmlNode In d.DocumentNode.SelectNodes("//ul[@class='oneitems']//li/h2/a")
ListBox1.Invoke(Sub() ListBox1.Items.Add(n.InnerText.Trim))
lst.Add(n.Attributes("href").Value)
Next
Button1.Invoke(Sub() Button1.Enabled = True)
Button1.Invoke(Sub() Button1.Text = "تم")
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim u As String = TextBox1.Text
Dim th As New Threading.Thread(AddressOf gd)
If th.IsAlive = False Then
Button1.Enabled = False
Button1.Text = "انتظر..."
th.Start(u)
End If
End Sub
End Class
حبيبى أخى سعود تسلم من كل شر...
أكيد الكود صحيح الذى أرسلته حضرتك لكن أكيد يوجد شيئ ناقص بجهازى او خطأ فى نسخة
الويندوز أو أو ... لا أعلم صراحة ما سبب الخطأ هذا

