Need experts help ?????? 
Author Message
 Need experts help ??????

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



Sun, 25 Feb 2001 03:00:00 GMT  
 Need experts help ??????
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



Sun, 25 Feb 2001 03:00:00 GMT  
 Need experts help ??????

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

Try this:
Public Sub showForm(f as object)
     f.show
 End Sub


Sun, 25 Feb 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Need Experts Help Please

2. Need Experts Help !!!!!????

3. Need Experts Help !!!!!????

4. Need experts help ??????

5. Need Expert Help!!

6. Need Expert Help with Font Installation

7. Need expert help with monthview

8. Need expert help on type casting.

9. Need Experts help! Dereferencing folder shortcuts

10. Expert help needed - OLE field for CSV text files

11. need help from expert on xmlhttp post

12. .Net expert help needed

 

 
Powered by phpBB® Forum Software