Hello and sorry to be posting a question around errors, but I have looked all over the web for an answer. I have not found a clear answer to why this error happens only in Design time, but not in runtime.
Events cannot be set on the object passed to the event binding service because a site associated with the object could not be located.
Click on the Error list and this is the line of code that is pointed too:
ainTree.mainTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(mainTree_NodeMouseClick);