How do you make GlobalMultiUse Instancing (VB 6.0) work in VB.Net?

Posted on 2007-07-31
Medium Priority
Last Modified: 2013-11-26
In VB 6.0 I was able to create a library with classes that were set as GlobalMultiUse.  Whenever I referenced this dll in a project, I didn't have to declare the object to use a function from one of the classes.  I was able to just call the name of the function or procedure and it knew that is was from the referenced dll.  Is there a way to do this in .Net?
Question by:vb9666
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 252 total points
ID: 19602155
You can use an Imports statement with VB.NET to short-cut syntax requirements, but there isn't any direct relationship for GlobalMultiUse.

LVL 38

Assisted Solution

PaulHews earned 248 total points
ID: 19602158
If you include a module in your library with public methods, you will be able to access them like this... You still have to use the library namespace, so you would have to use:

Imports MyLibraryNamespace

LVL 143

Accepted Solution

Guy Hengel [angelIII / a3] earned 500 total points
ID: 19602159
you need to declare the class (and the methods) as static.

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month14 days, 9 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question