Whenever you are trying to sort out problems in your code start at the very first error reported not somewhere in the middle!
The first error reported is not on that line at all - it's on
public void Form1_Load(object sender, CpuUsage e)
and states
Quote:
The type or namespace name 'CpuUsage' could not be found (are you missing a using directive or an assembly reference?)
Steps you can take to resolve your problem...
1. Have you spelled "CpuUsage" correctly - it's not CPUUsage or Cpuusage for example.
2. Have you referenced the DLL or included the class file for CpuUsage in your project?
3. What is the namespace for CpuUsage and should you have included it with a
using
4. If none of those work try "Clean Solution"
5. If that still doesn't work try removing the reference and putting it back
6. Check that whatever installed the CpuUsage class is properly installed (e.g. is the DLL properly registered)
I'll repeat my earlier advice - always start to deal with build errors with error number 1 - many of the others will simply disappear after it is fixed