Bu kodlar görev yöneticisinde en çok yada en az bellek kullanımı yapan istediğiniz bir programı sonlandırmanıza yani kapatmanıza olanak sağlıyor.
These codes allow you to terminate any program that uses the most or least memory in the task manager.
These codes allow you to terminate any program that uses the most or least memory in the task manager.
Kod:
Dim processes() As Process = Process.GetProcessesByName("notepad")
If processes.Length > 0 Then
Dim cnt As Integer
For cnt = 0 To processes.Length - 1
If Not processes(cnt).HasExited Then
If (processes(cnt).WorkingSet64 / 20000) < 10000 Then
Try
processes(cnt).Kill()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End If
End If
Next
End If