• 大小: 0.13M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-02-24
  • 语言: C#
  • 标签:

资源简介


资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;

namespace getprocess
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void getProcessInfo()
        {
            try
            {
                listView1.Items.Clear(); //清空ListView控件
                Process[] MyProcesses = Process.GetProcesses(); //获取所有进程
                string[] Minfo = new string[6]; //用于存储进程信息
                foreach (Process MyProcess in MyProcesses) //遍历所有进程
                {
                    Minfo[0] = MyProcess.ProcessName; //进程名
                    Minfo[1] = MyProcess.MainModule.ModuleName; //进程模块
                    Minfo[2] = MyProcess.Threads.Count.ToString(); //进程线程数
                    Minfo[3]

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         920  2009-02-08 09:28  sj\01\getprocess\getprocess.sln
     文件       13312  2009-02-08 10:05  sj\01\getprocess\getprocess.suo
     文件        1741  2009-02-08 09:44  sj\01\getprocess\getprocess\Form1.cs
     文件        4333  2009-02-08 09:44  sj\01\getprocess\getprocess\Form1.Designer.cs
     文件        5814  2009-02-08 09:44  sj\01\getprocess\getprocess\Form1.resx
     文件        3731  2009-02-08 09:41  sj\01\getprocess\getprocess\getprocess.csproj
     文件         491  2009-02-08 09:28  sj\01\getprocess\getprocess\Program.cs
     文件        9216  2009-02-08 09:44  sj\01\getprocess\getprocess\bin\Debug\getprocess.exe
     文件       24064  2009-02-08 09:44  sj\01\getprocess\getprocess\bin\Debug\getprocess.pdb
     文件       14328  2009-02-08 09:53  sj\01\getprocess\getprocess\bin\Debug\getprocess.vshost.exe
     文件         490  2007-07-21 01:33  sj\01\getprocess\getprocess\bin\Debug\getprocess.vshost.exe.manifest
     文件         617  2009-02-08 09:53  sj\01\getprocess\getprocess\obj\Debug\getprocess.csproj.FileListAbsolute.txt
     文件         847  2009-02-08 09:44  sj\01\getprocess\getprocess\obj\Debug\getprocess.csproj.GenerateResource.Cache
     文件        9216  2009-02-08 09:44  sj\01\getprocess\getprocess\obj\Debug\getprocess.exe
     文件         180  2009-02-08 09:44  sj\01\getprocess\getprocess\obj\Debug\getprocess.Form1.resources
     文件       24064  2009-02-08 09:44  sj\01\getprocess\getprocess\obj\Debug\getprocess.pdb
     文件         180  2009-02-08 09:41  sj\01\getprocess\getprocess\obj\Debug\getprocess.Properties.Resources.resources
     文件        1352  2009-02-08 09:28  sj\01\getprocess\getprocess\Properties\AssemblyInfo.cs
     文件        2870  2009-02-08 09:28  sj\01\getprocess\getprocess\Properties\Resources.Designer.cs
     文件        5612  2009-02-08 09:28  sj\01\getprocess\getprocess\Properties\Resources.resx
     文件        1095  2009-02-08 09:28  sj\01\getprocess\getprocess\Properties\Settings.Designer.cs
     文件         249  2009-02-08 09:28  sj\01\getprocess\getprocess\Properties\Settings.settings
     文件         923  2009-02-08 10:05  sj\02\killProcess\killProcess.sln
     文件       13824  2009-02-08 10:14  sj\02\killProcess\killProcess.suo
     文件        3700  2009-02-08 10:10  sj\02\killProcess\killProcess\Form1.cs
     文件        4964  2009-02-08 10:09  sj\02\killProcess\killProcess\Form1.Designer.cs
     文件        5814  2009-02-08 10:09  sj\02\killProcess\killProcess\Form1.resx
     文件        3768  2009-02-08 10:09  sj\02\killProcess\killProcess\killProcess.csproj
     文件         492  2009-02-08 10:05  sj\02\killProcess\killProcess\Program.cs
     文件       10752  2009-02-08 10:10  sj\02\killProcess\killProcess\bin\Debug\killProcess.exe
     文件       22016  2009-02-08 10:10  sj\02\killProcess\killProcess\bin\Debug\killProcess.pdb
............此处省略36个文件信息

评论

共有 条评论