David,
The plugin waits until CamBam top window has loaded then it checks for the snap toolbar and grid toolbar, hooks into the mouse, gets stored settings from Windows Registry. form loads and sets check boxes using stored settings.
After that it uses the mouse position and detects any entities it passes over, however it does update itself first to get the latest version of any file CamBam has loaded.
// need these here to get instance of newly loaded file
view = CamBamUI.MainUI.ActiveView;
myfile = view.CADFile;
I don't know the mechanism used when a file is loaded from it's icon rather than using File->Open from withing the software.