ponedjeljak, 23. ožujka 2009.

Dll : How to create and use dll in Visual Basic 6

This is short tutorial of crating and using dll.

DLL CREATING:

1. Start Miscrosoft Visual Basic 6
2. File/ New Project
3. Choose: ActiveX DLL
4. Write some functions or what you need. If you wish to use it, it sholud not be private.
5. Change project and class name and save projetct! (File/ Save As..)
6. Make dll: File/Make dllName.dll

REGISTER DLL:

1. Start/Run
2. regsvr32 and (drag/drop) dll ... to unregister regsvr32 /u and (drag/droo)dll
3. Enter

USE DLL IN SOME OTHER PROJECT:
To use dll in some project you ned to make reference to that dll.

1. Open the project that will use dll.
2 Project/References
3 Browse to the .dll you wish to use.

REGISTER DLL IN THE PROJECT.

To use classes from dll you need to create object.

1. Dim nameOfObject As dllName.ClassName
2. Set nameOfObject= New dllName.ClassName
3. nameOfObject.ClassFunctions