help me

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robertkill

    #1

    help me

    My English not very good,please excuse me!
    I want look for system's processes,there is one error like this
    :"processes performance counter is not enable!" why??
    ÎÒÔÚÁоÙϵͳ½ø³ ̵ÄʱºòÔõôÀÏÊÇ ±¨´í£¬Ëµ¡°½ø³ÌÐ ÔÄܼÆÊýÆ÷ÒѽûÓà £¬Òò´ËÎÞ·¨Ö´
    ÐÐËù
    ÇëÇóµÄ²Ù×÷¡£¡±£ ¬²é°ïÖú²é²»³öÀ´ £¡£¡Çó¸÷λ´ó켅 ¸µãÖ¸µãСµÜ~~£¬ ¾ßÌå³ÌÐòÈçÏÂ
    £¡


    THE CODE:
    private void BottonStop_Clic k(object sender, System.EventArg s e)
    {
    try
    {
    Process[] My_Processes;
    //System.Diagnost ics.Performance Counter
    My_Processes = Process.GetProc esses();
    foreach (Process instance in My_Processes)
    {
    listBox1.Items. Add(instance.Pr ocessName.ToStr ing());
    }
    }
    catch(System.In validOperationE xception aaa)
    {
    MessageBox.Show (aaa.ToString() );
    }
    }




Working...