A Simple Task Manage Like Application

This is a Simple Task Manager like Application Created using the process Class.

You can use code from this application to implement in your own application.

This Application contains Code to Get the list of
1)Running Applications And Display Details In a List View:


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ToolStripStatusLabel2.Text = Process.GetProcesses.Length.ToString
ListView1.Items.Clear()
For i = 0 To Process.GetProcesses.Length - 1
Try
ListView1.Items.Insert(i, Process.GetProcesses.GetValue(i).ProcessName)
tms = Process.GetProcesses.GetValue(i).TotalProcessorTime.Hours.ToString & ":" & Process.GetProcesses.GetValue(i).TotalProcessorTime.Minutes.ToString & ":" & Process.GetProcesses.GetValue(i).TotalProcessorTime.Seconds.ToString
ListView1.Items.Item(i).SubItems.Add(Process.GetProcesses.GetValue(i).ID)
ListView1.Items.Item(i).SubItems.Add(Process.GetProcesses.GetValue(i).PriorityClass.ToString())
ListView1.Items.Item(i).SubItems.Add(Process.GetProcesses.GetValue(i).SessionID.ToString)
ListView1.Items.Item(i).SubItems.Add(tms)
Catch ex As Exception
ListView1.Items.Item(i).SubItems.Add("N/A")
End Try
Next
End Sub

2)Kill Selected Process from the ListView :


Private Sub KillProcess(ByVal sender As System.Object, ByVal e As System.EventArgs)
Try
Process.GetProcesses().GetValue(ListView1.SelectedItems(0).Index).kill()
Catch
MsgBox("Could Not Quit", MsgBoxStyle.OkOnly, "Skullz TaskViewer")
End Try
End Sub

3.Display or Hide only Selected Details from ListView:

Private Sub SelectedDetails(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton3.Click
With ToolStripComboBox1
Try
If ListView1.Columns(.SelectedIndex).Width <> 0 Then
ListView1.Columns(.SelectedIndex).Width = 0
Else
ListView1.Columns(.SelectedIndex).AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize)
End If
Catch ex As Exception
End Try
End With
End Sub

Download the Full Application for Easier Reffrence
================================================================================
Regards Hefin Dsouza


Attachments

  • Download Sample Application (20937-11659-taskmandem.rar)
  • Comments

    No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: