如题 
如何获取某一程序的CPU占用率

解决方案 »

  1.   

    You can try PHD APIs; The PDH library includes an interface where a program 
    can specify a counter using something called a counter path.  The counter 
    path can be complex or simple depending on what data you are gathering.   For getting CPU usage of a process the object to query is the "Process" 
    object, the counter is "% Processor Time", and the instance is the name of 
    the process.  So for example, to get the CPU usage of notepad the path will 
    look like this: "\process(notepad)\% processor time"  You can do the same 
    given the name of any process. Reference
    INFO: Collecting Performance Data Using PDH APIs from Visual Basic
    http://support.microsoft.com/kb/q296526/
      

  2.   

    http://www.chinaaspx.com/archive/VC/19838.htm
      

  3.   

    这个例子对你应该会有帮助:
    http://www.freevbcode.com/source/CS_CPU_Monitor.zip