29-12-13, 09:34 PM
PHP كود :
Dim forbiddenWords As New List(Of String)({"facebook", "yahoo"})
RefreshWindowTexts()
Dim keys As IntPtr() = New IntPtr(windowTexts.Keys.Count - 1) {}
windowTexts.Keys.CopyTo(keys, 0)
Dim pids As New List(Of Integer)
For Each ptr As IntPtr In keys
For I As Integer = 0 To forbiddenWords.Count - 1
If windowTexts(ptr).ToLower().Contains(forbiddenWords(I).ToLower()) Then
Dim pid As Integer = 0
GetWindowThreadProcessId(ptr, pid)
If Not pids.Contains(pid) Then
Process.GetProcessById(pid).Kill()
pids.Add(pid)
End If
End If
Next
Next

