Hi,
I'm not sure what happened here, but I had a whole set of tabpages with
home-made buttons on them. A shortened version of the class I wrote them in
is here:
using System;
using System.Windows.Forms;
using System.Drawing;
namespace ToleranceUnits
{
public class Button3x : CheckBox
{
public Button3x()
{
this.Appearance = Appearance.Button;
this.gmcm = "gm-cm";
this.gmin = "gm-in";
}
private string gmcm;
private string gmin;
public string Gmcm
{
get
{
return this.gmcm;
}
set
{
this.gmcm = value;
}
}
}
}
Suddenly, when I tried to run the debug, it complained that it couldn't find
ToleranceUnits.Button3x. So I removed the home-made tool from the toolbox
and re-added it. Now it can find Button3x, but it still won't run (and the
buttons don't appear on the design tabs). The error message is:
An unhandled exception of type 'System.NullReferenceException' occurred in
HCAUT.exe
Additional information: Object reference not set to an instance of an object.
This has happened once before and I just re-created all the buttons, but I'm
wondering if there's an easier (and quicker) way to fix this. Also, what did
I do to make it angry in the first place?
Thanks,
Melanie