Results 1 to 12 of 12
  1. #1
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed

    [Tutorial] Task Manager

    Easy Task Manager
    You can add this to any existing app, or use it as a standalone app
    In either case, it doesn't hurt to know how to do this
    and it's a lot easier then everyone may think


    • Create a new VB.net project.
    • Add a Tab Control to your form (you should dock it full, I didn't for asthetic reasons)


    • Add A list view inside the tab and set dock to top (leaving room for some buttons and a textbox
      (in the below image it is docked full, remember to dock Top

    • Add 2 buttons
    • Add a textbox

      Should look like this


    • Click your listviewbox and click Items - Collection


    • Add these items with the following settings for each


    Code:
    --------------------------
    Name: ichimage
    Modifier: Friend
    Text: Imagename
    Width: 100
    
    Name: ichcaption
    Modifier: Friend
    Text: Caption
    Width: 200
     
    Name: ichuser
    Modifier: Friend
    Text: Responding
    Width: 100
    
    Name: ichid
    Modifier: Friend
    Text: SessionID
    Width: 100
    
    ---------------------------------
    Your Column Collection should look something like this



    • Set the text for your buttons to , Refresh and End Process



    'Note: You can set a timer to auto refresh, if you want to , let me know and I will add it it to the post.

    • Set the text of the textbox to "[machinename]" without quotes (keep brackets)


    The appearence of your project should look something like this (give or take )



    Code : (here is the code you need to make it work, I will try and note as much as possible so you know what is going on)

    Code:
    ' Description:This code is used in making a working taskmanager
    ' By: NextGen1 of Mpgh.net
    ' This code is copyrighted and comes  with no warranties.
    ' This code is intended for demonstration and all rights are granted soley to mpgh.net and it's members
    ' If you require any further information please contact me at mpgh.net via PM (Get an account if you don't have one) 
    ' Tutorials and apps create by me for mpgh.net will contain the following agreement 
    ' By adding this code in whole or part to any existing or new application you agree to the following terms 
    ' You agree to keep these notes connected with this code.
    ' You agree to grant credit to it's source (Mpgh.net)   
    ' You agree to keep this note in whole without edit inside of your code
    
    'Required Namespaces , allows us to check system diagnostics including Task, Processes, Cpu, Memory, Etc. 
    Imports System
    Imports System.Diagnostics
    Public Class Form1
    ' Asthetics    
    Inherits System.Windows.Forms.Form
    
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'Sets the textbox to the machinename        
    TextBox1.Text = System.Environment.MachineName.ToString
    'Fills the list with running processes
    Call FillList(TextBox1.Text)
        End Sub
    
    ' Gets running processes    
    Sub FillList(ByVal MachineName As String)
            Dim Prc() As Process
            Dim i As Integer
            Dim lvwP As ListViewItem
            Try
                lvwProcesses.Items.Clear()
                Prc = Process.GetProcesses(MachineName)
    
                For i = 0 To UBound(Prc)
                    lvwP = lvwProcesses.Items.Add(Prc(i).ProcessName.ToUpper)
    
                    If MachineName <> System.Environment.MachineName Then
                        lvwP.SubItems.Add("Unavailable...")
                        lvwP.SubItems.Add("Unavailable...")
                        lvwP.SubItems.Add(Prc(i).Id)
                    Else
                        lvwP.SubItems.Add(Prc(i).MainWindowTitle)
                        lvwP.SubItems.Add(Prc(i).Responding)
                        lvwP.SubItems.Add(Prc(i).Id)
                    End If
    
                Next
            Catch
                lvwProcesses.Items.Add("Error enumerating items...")
            End Try
        End Sub
    
        Private Sub ButtonX1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX1.Click
            Dim Prc As Process
    
            If TextBox1.Text = System.Environment.MachineName.ToString Then
                Try
                    Prc = Process.GetProcessById(lvwProcesses.SelectedItems(0).SubItems(3).Text)
                    Prc.Kill()
                    lvwProcesses.Items.Remove(lvwProcesses.SelectedItems.Item(0))
                Catch
                    MessageBox.Show("Could not close process, " & Err.Description, "Error:", MessageBoxButtons.OK, MessageBoxIcon.Stop)
                End Try
            Else
                MessageBox.Show("You cannot close processes on a remote machine, only view them!", "Error:", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
            End If
        End Sub
    
        Private Sub ButtonX2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX2.Click
            TextBox1.Text = TextBox1.Text.ToUpper
            Call FillList(TextBox1.Text)
        End Sub
    End Class
    That should be everything, run it and test it, if I left out something or you would like to know more about a Task Manager , Pm me, or post your questions here

    Screenshot of final product



    Virus Scan For Source

    Virus Scan For Sample

    Download Source Code Example

    Download Sample


    Hope this helps someone.

    Note: Yes I just realized the linklabel says mpght.net it should be mpgh.net, however, it's a clickable link that takes you to mpgh.net

    Note: You may need to make minor changes depending on your controls and it's names
    Last edited by NextGen1; 01-18-2010 at 11:56 PM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  2. The Following 4 Users Say Thank You to NextGen1 For This Useful Post:

    Alroundeath (04-27-2010),gana04 (02-27-2011),Void (01-19-2010),Zoom (01-19-2010)

  3. #2
    MugNuf's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    790
    Reputation
    9
    Thanks
    160
    My Mood
    Goofy
    I like your GUI .

    I have one, but good tutorial.

  4. #3
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Thanks and Thanks


     


     


     



    The Most complete application MPGH will ever offer - 68%




  5. #4
    Nexulous's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    in dbb's vagina.
    Posts
    4,047
    Reputation
    63
    Thanks
    218
    My Mood
    Innocent
    beastly. But I has one already.

  6. #5
    HazXoD3D's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    46
    Reputation
    10
    Thanks
    6
    My Mood
    Psychedelic
    you should add ,how much memory each process takes ^.^ will not be so hard i think xD







  7. #6
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused
    I already posted a TUT on this 2 months ago.
    Proof: https://www.mpgh.net/forum/33-visual-...k-manager.html(check the date)
    Last edited by Bombsaway707; 01-20-2010 at 04:33 PM.

  8. #7
    Pixie's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    Pixie wird wieder steigen.
    Posts
    1,884
    Reputation
    22
    Thanks
    229
    My Mood
    Fine
    Quote Originally Posted by bombsaway707 View Post
    I already posted a TUT on this 2 months ago.
    Proof: https://www.mpgh.net/forum/33-visual-...k-manager.html(check the date)
    His looks a lot more better
    There can be more than 1 tutorial for one subject (Really only 2)

  9. #8
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused
    Quote Originally Posted by Pixie View Post

    His looks a lot more better
    There can be more than 1 tutorial for one subject (Really only 2)
    Yah never said mine was better just pointing out that i posted a TUT on this 2 months ago

  10. #9
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Quote Originally Posted by bombsaway707 View Post
    Yah never said mine was better just pointing out that i posted a TUT on this 2 months ago
    Each coder has his own style much can be learned by studying the differences. So now there are more ways to learn


     


     


     



    The Most complete application MPGH will ever offer - 68%




  11. The Following User Says Thank You to NextGen1 For This Useful Post:

    Lolland (01-20-2010)

  12. #10
    hopefordope's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    Herndon,VA
    Posts
    264
    Reputation
    9
    Thanks
    86
    My Mood
    Psychedelic
    dude when i press Ok in the collum Editor Nothing Happens

  13. #11
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    looks good...

  14. #12
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Quote Originally Posted by hopefordope View Post
    dude when i press Ok in the collum Editor Nothing Happens
    Works fine for me, If your new to VB and need help, Request a tutorial.

    Hope this helps


     


     


     



    The Most complete application MPGH will ever offer - 68%




Similar Threads

  1. Enable your Task Manager
    By sommotommo in forum Programming Tutorials
    Replies: 18
    Last Post: 06-24-2009, 02:02 AM
  2. Enable your Task Manager
    By sommotommo in forum Combat Arms Hacks & Cheats
    Replies: 17
    Last Post: 06-20-2009, 11:16 PM
  3. how to enable task manager
    By munhk111 in forum WarRock - International Hacks
    Replies: 9
    Last Post: 03-01-2008, 04:53 PM
  4. Task Manager
    By TheBlueMax in forum General
    Replies: 5
    Last Post: 11-17-2007, 08:21 AM
  5. Task Manager Problem!
    By Ryyko in forum Hardware & Software Support
    Replies: 22
    Last Post: 05-16-2007, 08:38 PM