Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 - User Control Compatibility

Status
Not open for further replies.

BlackKnight

Programmer
Oct 18, 2000
348
US
Hi folks,

I have created a user control which has worked fine and dandy in a couple of previous projects. It was created and its compatibility was set to PROJECT.

I have started a new project and remade the control with binary compatibility but it gives me an error when my project is compiled. It says that the control's return type is not compatible.

It shows as:

Original declaration: dim myParent as object

Current declaration: dim myParent as form

I don't know where it gets its orignal declaration from. I never declared it that way. It suggested changing my declaration but I can't do it since I use early binding and it would make a big mess. <g> Any help would be appreciated. Thanx in advance.

Have a good one!
BK
 
Changing the return type from form to object will not mess up your code. You just won't get to use the intelesense that's built into visual basic. Since the Visual BASIC form is not a standard COM interface, it can't be returned. Unfortunatelly, I think you'll have to use late binding here and take a slight speed hit if you really need to pass the form in the control.

The other option would be to rethink the logic to see if there's a way to do it without passing the form. Snaggs
tribesaddict@swbell.net
If a parsley farmer is sued, can they garnish his wages?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top