资源简介
实现应用程序列表,进程列表,映像名,cpu使用率,性能选项包括王物理内存使用情况的动态网格,服务的PID,描述,状态等
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.ServiceProcess;
using System.Runtime.InteropServices;
using System.Management;
using System.Threading;
using System.IO;
using System.Reflection;
using System.Collections;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
#region API声明
private const int MAX_PATH = 260;
public const int PROCESS_ALL_ACCESS = 0x000F0000 | 0x00100000 | 0xFFF;
[DllImport(“User32.dll“)]
public extern static int GetWindowThreadProcessId(IntPtr hWnd out int lpdwProcessId);
[DllImport(“Kernel32.dll“)]
public extern static IntPtr OpenProcess(int fdwAccess int fInherit int IDProcess);
[DllImport(“coredll.dll“)]
public extern static bool TerminateProcess(IntPtr hProcess int uExitCode);
[DllImport(“Kernel32.dll“)]
public extern static bool CloseHandle(IntPtr hobject);
[DllImport(“user32.dll“)]
public extern static IntPtr FindWindow(string lpClassName string lpWindowName);
[DllImport(“user32.dll“)]
public static extern bool ShowWindow(IntPtr hWnd int nCmdShow);
[System.Runtime.InteropServices.DllImport(“user32.dll“)]
private static extern bool OpenIcon(IntPtr hWnd);
[System.Runtime.InteropServices.DllImport(“user32.dll“)]
private static extern bool IsIconic(IntPtr hWnd);
[System.Runtime.InteropServices.DllImport(“user32.dll“)]
private static extern int SetForegroundWindow(IntPtr hWnd);
public const int SW_HIDE = 0;
public const int SW_SHOWNORMAL = 1;
public const int SW_NORMAL = 1;
public const int SW_SHOWMINIMIZED = 2;
public const int SW_SHOWMAXIMIZED = 3;
public const int SW_MAXIMIZE = 3;
public const int SW_SHOWNOACTIVATE = 4;
public const int SW_SHOW = 5;
public const int SW_MINIMIZE = 6;
public const int SW_SHOWMINNOACTIVE = 7;
public const int SW_SHOWNA = 8;
public const int SW_RESTORE = 9;
public const int SW_SHOWDEFAULT = 10;
public const int SW_FORCEMINIMIZE = 11;
public const int SW_MAX = 11;
[DllImport(“Psapi.dll“ EntryPoint = “GetProcessImageFileName“)]
private static extern uint GetProcessImageFileName(IntPtr hModule [Out] StringBuilder lpszFileName int nSize);
[DllImport(“Psapi.dll“ EntryPoint = “GetModuleFileNameEx“)]
public static extern uint GetModuleFileNameEx(int handle IntPtr hModule [Out] StringBuilder lpszFileName int nSize);
[DllImport(“shell32.dll“ SetLastError = true)]
private static extern IntPtr ExtractIconEx(string fileName
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 46592 2013-10-13 20:18 李明明_任务管理器\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
文件 77312 2013-10-13 20:18 李明明_任务管理器\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
文件 22984 2013-10-13 20:21 李明明_任务管理器\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
文件 490 2012-06-06 02:06 李明明_任务管理器\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
文件 38951 2013-10-13 20:18 李明明_任务管理器\WindowsFormsApplication1\Form1.cs
文件 51960 2013-10-13 16:24 李明明_任务管理器\WindowsFormsApplication1\Form1.Designer.cs
文件 7203 2013-10-13 16:24 李明明_任务管理器\WindowsFormsApplication1\Form1.resx
文件 3457 2013-10-12 17:11 李明明_任务管理器\WindowsFormsApplication1\LineChart-1.cs
文件 1601 2013-10-09 10:49 李明明_任务管理器\WindowsFormsApplication1\LineChart-1.Designer.cs
文件 5814 2013-10-09 10:46 李明明_任务管理器\WindowsFormsApplication1\LineChart-1.resx
文件 4252 2013-10-12 17:36 李明明_任务管理器\WindowsFormsApplication1\LineChart.cs
文件 1599 2007-03-29 09:12 李明明_任务管理器\WindowsFormsApplication1\LineChart.Designer .cs
文件 1599 2013-10-08 21:54 李明明_任务管理器\WindowsFormsApplication1\LineChart.designer.cs
文件 5814 2013-10-08 21:54 李明明_任务管理器\WindowsFormsApplication1\LineChart.resx
文件 1178 2013-10-11 22:28 李明明_任务管理器\WindowsFormsApplication1\MyWin32.cs
文件 35911 2013-10-13 20:18 李明明_任务管理器\WindowsFormsApplication1\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
文件 7655 2013-10-13 16:03 李明明_任务管理器\WindowsFormsApplication1\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 580 2013-10-09 10:53 李明明_任务管理器\WindowsFormsApplication1\obj\x86\Debug\GenerateResource.read.1.tlog
文件 1410 2013-10-09 10:53 李明明_任务管理器\WindowsFormsApplication1\obj\x86\Debug\GenerateResource.write.1.tlog
文件 180 2013-10-13 17:11 李明明_任务管理器\WindowsFormsApplication1\obj\x86\Debug\Test.LineChart.resources
文件 180 2013-10-13 17:11 李明明_任务管理器\WindowsFormsApplication1\obj\x86\Debug\Test.LineChart_1.resources
文件 3070 2013-10-13 20:21 李明明_任务管理器\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt
文件 1101 2013-10-13 17:11 李明明_任务管理器\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.csproj.GenerateResource.Cache
文件 12109 2013-10-13 19:26 李明明_任务管理器\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.csprojResolveAssemblyReference.cache
文件 46592 2013-10-13 20:18 李明明_任务管理器\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.exe
文件 180 2013-10-13 17:11 李明明_任务管理器\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.Form1.resources
文件 77312 2013-10-13 20:18 李明明_任务管理器\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.pdb
文件 180 2013-10-13 17:11 李明明_任务管理器\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.Properties.Resources.resources
文件 505 2013-09-11 10:06 李明明_任务管理器\WindowsFormsApplication1\Program.cs
文件 1398 2013-09-11 10:06 李明明_任务管理器\WindowsFormsApplication1\Properties\AssemblyInfo.cs
............此处省略22个文件信息
- 上一篇:C# List用法详解
- 下一篇:人脸识别源码C#
相关资源
- C# 调用win32 api函数-user32.dll详细说明
- C# 调用BarTender打印条码DEMO
- 大型比赛竞赛抽签系统 可打印 c# vs
- C#编写的Gerber查看器
- lua C# .Net4.0 vs2010 LuaInterface
- C#十六进制编辑器
- 明华URF-35H读卡器 C#读写源码 为大家
- C#文件流读取CSV文件
- c#读写PDF文件sql
- C# winform Socket大文件传输
- c#车牌识别系统附30张测试图片
- 《C#面向对象程序设计》源代码(CS)
- 金旭亮《C#面向对象程序设计》教案
- 试题库管理系统毕业论文(C#)源程序
- 学校网站原代码(C#.NET)
- C#-数据库操作技术-员工管理系统
- c#web开发入门经典
- C#与Matlab混合编程的几种方式
- c# 开发与 mysql数据库实现的增删改查
- C#异步操作 异步查询数据库 异步处理
- Basler相机通过IO触发源码
- [源代码] 《领域驱动设计 (C# 2008 实
- 松下PLC与C#通讯串口调试入门教程.z
- USB 继电器控制器 LCUS-1 保证能用 c#
- C# AES加密解密小工具
- C#圆形按钮,非常漂亮动态~~
- [精]C#仿QQ右下角弹出提示框()
- C#进程间通信-共享内存代码
- 有史以来最简单的三层(C#)
- vb调用c#编写的串口DLL文件(vb源码
评论
共有 条评论