06-05-22, 05:06 AM
الصفحات : 1 2
06-05-22, 05:51 PM
(06-05-22, 05:06 AM)dasktop كتب : [ -> ]نجح الكود كل الشكر لك استاذ سعود
سااسميك دكتور الفيوجال بيسك
العفو اخي الكريم
06-05-22, 09:36 PM
(06-05-22, 05:51 PM)سعود كتب : [ -> ](06-05-22, 05:06 AM)dasktop كتب : [ -> ]نجح الكود كل الشكر لك استاذ سعود
سااسميك دكتور الفيوجال بيسك
العفو اخي الكريم
اخي سعود انا حدثت كودك التالي
PHP كود :
On Error Resume Next
Dim ip As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties
Dim p As TcpConnectionInformation() = ip.GetActiveTcpConnections
For Each t In p
Dim port As String = t.RemoteEndPoint.Port
Dim index As Integer = ListBox1.Items.IndexOf(port)
If index = -1 And (port = 443 Or port = 80) Then
ListBox1.Items.Add(port)
Else
If index = -1 And (port <> 443 Or port <> 80 ) Then
ListBox1.SetSelected(index)
MsgBox("توجد منافذ غير مدرجة", MsgBoxStyle.Exclamation, "تنبيه")
End If
End If
Next
بااضافة ListBox1.SelectedItem(index) اذا في منفذ يختلف عن 443 و80 يحدد عليه
ولم يحدد لماذا
06-05-22, 09:49 PM
إقتباس :ولم يحدد لماذاشي طبيعي لان بعد else لم نضف بنود الى الـ ListBox
اذا اردت ان يتم تحديد البورتات الاخرى تحتاج تفعيل الـ Selection Mod ضمن خصائص الـ ListBox ايضا نعدل شوي على الكود بحيث لا نستخدم else وانما بعد الانتهاء من الاسناد في الجملة الشرطية الاولى نخرج من الجملة ونقوم بتفحص القيم وبناءا عليه نحدد.
باذن الله ساعدل على الكود ان لم تسبقني ساكتب الكود.
PHP كود :
Dim ip As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties
Dim p As TcpConnectionInformation() = ip.GetActiveTcpConnections
For Each t In p
Dim port As String = t.RemoteEndPoint.Port
Dim index As Integer = ListBox1.Items.IndexOf(port)
If index = -1 Then
ListBox1.Items.Add(port)
End If
Next
For r As Integer = 0 To ListBox1.Items.Count - 1
Dim h As String = ListBox1.Items(r)
If (h <> 443 And h <> 80) Then
Dim i As Integer = ListBox1.Items.IndexOf(h)
ListBox1.SetSelected(i, True)
End If
Next
@@@@@@@@@@@@@@@@@@@@@@@@@
===================================
تعديـــــــــــــــل
PHP كود :
Dim ip As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties
Dim p As TcpConnectionInformation() = ip.GetActiveTcpConnections
For Each t In p
Dim port As String = t.RemoteEndPoint.Port
Dim index As Integer = ListBox1.Items.IndexOf(port)
If index = -1 Then
ListBox1.Items.Add(port)
End If
Next
For r As Integer = 0 To ListBox1.Items.Count - 1
Dim h As String = ListBox1.Items(r)
If (h <> 443 And h <> 80) Then
ListBox1.SetSelected(r, True)
End If
Next
07-05-22, 12:12 AM
كل الشكر لك استاذ سعود وتم الانتهاء من البرنامج بنجاح
ويهمنا رايك هنا المشروع كامل
http://vb4arb.com/vb/showthread.php?tid=...#pid181946
ويهمنا رايك هنا المشروع كامل
http://vb4arb.com/vb/showthread.php?tid=...#pid181946
الصفحات : 1 2