c#实现windows进程管理器的方法类

下载源代码

Windows进程管理器.rar

 

关键代码很简单,在这里

                ProcessModuleCollection modules;
                if (instance.ProcessName.CompareTo("System") != 0 || instance.ProcessName.CompareTo("Idle") != 0)
                {
                    try
                    {
                        ////当进程不充允枚举模块时会产生异常
                        modules = instance.Modules;
                       
                        foreach (ProcessModule aModule in modules)
                        {
                            strToolTip += aModule.ModuleName;
                            strToolTip += "; ";
                        }
                    }
                    catch (System.ComponentModel.Win32Exception)
                    {
                    }
                }
 

具体实现请点击源代码下载

Tags:  windows进程管理器 任务管理器进程

延伸阅读

最新评论

  1. rrr

发表评论