I must be doing something wrong here 
Author Message
 I must be doing something wrong here

Creating a new class library but I cannot access the internal workings.
EG:

Public Class MyClass

  Public Function SomeFunction(ByVal SomeVar as String) as Boolean
    ...
  End Function
End Class

IT compiles to a dll fine, I can even import it into a project, but when I try
to actually use the reference it does not show EG:
mydll.MyClass.${Nothing here but SomeFunction should show}

I have created dozens of OCX's and DLLs under VB6, but for the life of me I
cannot get one to work properly under .Net.

I have even copied examples from books to no avail.

--
Wayne M Jackson
http://www.*-*-*.com/

Inter Arma Enim Silent Leges - Marcus Tullius Cicero
In time of War, the law falls silent
-----------------------------------------------------------------



Thu, 23 Sep 2004 09:37:17 GMT  
 I must be doing something wrong here
If you create a DLL called "MyDLL" for example and that DLL contains a class
called "Class1" and then within that class you have a public function called
"MyFunction" all you should have to do is:

1)  From the Project Menu | Choose "Add Reference" and locate the DLL.
2) In your code do -->  Dim dllFunction as New MyDLL.Class1
3) Then you should be able to refernce the function by -->
dllFunction.MyFunction

Brian Patterson


Quote:
> Creating a new class library but I cannot access the internal workings.
> EG:

> Public Class MyClass

>   Public Function SomeFunction(ByVal SomeVar as String) as Boolean
>     ...
>   End Function
> End Class

> IT compiles to a dll fine, I can even import it into a project, but when I
try
> to actually use the reference it does not show EG:
> mydll.MyClass.${Nothing here but SomeFunction should show}

> I have created dozens of OCX's and DLLs under VB6, but for the life of me
I
> cannot get one to work properly under .Net.

> I have even copied examples from books to no avail.

> --
> Wayne M Jackson
> http://www.users.bigpond.net.au/warp_kez

> Inter Arma Enim Silent Leges - Marcus Tullius Cicero
> In time of War, the law falls silent
> -----------------------------------------------------------------



Thu, 23 Sep 2004 12:41:51 GMT  
 I must be doing something wrong here


Quote:
> If you create a DLL called "MyDLL" for example and that DLL contains a class
> called "Class1" and then within that class you have a public function called
> "MyFunction" all you should have to do is:

> 1)  From the Project Menu | Choose "Add Reference" and locate the DLL.
> 2) In your code do -->  Dim dllFunction as New MyDLL.Class1
> 3) Then you should be able to refernce the function by -->
> dllFunction.MyFunction

That did the trick.  Thanks


Fri, 24 Sep 2004 07:25:04 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Am I doing something wrong ?

2. Am I doing something wrong...??

3. Am I doing something wrong...??

4. Obviously I'm doing something wrong!

5. Recordset: What am I doing wrong?

6. What am I doing wrong??

7. What am I doing wrong?

8. Help with syntax. What am I doing wrong

9. What am I doing wrong?

10. What am I doing wrong?

11. What am I doing wrong?

12. Please tell me what I am doing wrong - DAO parameter Append Query :(

 

 
Powered by phpBB® Forum Software