Visual Basic 6.0: Compile Error When You Reopen a Project That Uses Implements
I have a VB6.0 project that contains the line
Implements IObjectSafety
I tried reopening this prject and compile it (.dll)
it throws an error like
开发者_开发问答---------------------------
Microsoft Visual Basic
---------------------------
Compile error:
User-defined type not defined
---------------------------
tried to fix it using this url http://support.microsoft.com/kb/191207
but still no use
is there any help/ suggestions on this
Where is the class IObjectSafety
defined? Is it part of your own project?
If it is defined in another project, make sure that you have referenced the project/DLL correctly & the class is public.
EDIT: Remove the line Implements IObjectSafety
and type it again. Compile it & see if that works.
EDIT2: Could you remove all the code that is related to IObjectSafety
and see if it compiles. And then add the Implements
line at the top & add code progressively.
Does that help?
EDIT3: Here is the last thing, I could think of.
- Remove the reference to the DLL
- Remove the code that relates to
IObjectSafety
Save the project, Compile it, Close it.
Open the project containing
IObjectSafety
class & compile it.Close this project.
Open the project that will be using
IObjectSafety
- Add the reference to the library containing
IObjectSafety
- Compile the code
What happens?
精彩评论