I guess you mean ...
does work but only ...
You didn't mention that it was only when compiled that it didn't work
Inspecting the code in CEnhancedForm.cs I notice that it doesn't support the runtime addition of the Close event. I don't know if this was the previous problem you referred to as you haven't told me about the problem you found.
I suspect that the omission is deliberate as I've looked at what is needed to hack it into CEnhancedForm and gave up as it looks like it might need a compiler change as well.