File "name" is not closed (Error 1933)

Internal consistency error. A form (.scx) or visual class library (.vcx) file was closed but the method and event code that is stored in it is still in use.