The reason for the first problem is that you are trying to pass a
private object module (the form) to a public object module (the
class).
In order to get this working you should declare the f parameter as
object. This will work but give late binding to the form in the
showForm method.
To be honest i can't really see why you would want to pass a form into
a class though?!
So far as the second question. Your a bit vague on what your trying
to achieve. What I can suggest if it's really what your after is that
you look at how interfaces work. Basically the rules for creating
re-useable objects is to maintain the original interface of an object
for compatibility with apps that currently use the object and extend
this object by adding additional functionality through
properties,methods and implementation WITHOUT changing the original
interface.
VB Books online gives some good information on OO techniques. Search
for Implements, Polymorphism, Inheritance.
Clear as mud!!!!!
Hope this helps
Darren Lewis
MCSD
Quote:
>Hello,
>The following is a CLASS
>Public Sub showForm(f as Form)
> f.show
>End Sub
>I am going to compile the above code to Activex DLL.
>But it failed. What's wrong with these codes ?
>Could you pleased to teach me what can I do ?
>By the way, How to design Plug-in function ?
>Such as I write a program. And I want to add some function in it.
>I don't want to modify the whole program every time when aI want to add
>some functions. How can I do ?
>Where can I find this kind of information,references or tutorials ?
>Please teach me if you have this programming experiences in VB ?
>Best regards,
>Eric