Click to See Complete Forum and Search --> : Looking for tutorials - how to make a dll/ocx
mickle026
August 7th, 2001, 10:12 AM
Im looking for good tutorials on how to make a dll/ocx
I have lots of functions that i made and would like to put them into a dll/ocx or something so that i can use them without having to add my modules to every program i make, does anyone know of any really good tutorials??
Ive been scouring the net, but keep seeming to d/l dll's without the info on how to make them.
Thanks in advance, a fairly good programmer,but still a relative newbie
mick
Cimperiali
August 8th, 2001, 02:48 AM
Inside vb, call for help and in Search tab digit "Activex"
Look for "Creating ActiveX Components" and double click on it.
Cesare Imperiali
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
Clearcode
August 8th, 2001, 03:22 AM
Typically what you would do is group the functions by type and create one public class file for each type. For example if you have some string functions, some math functions and some drawing functions you would have a StringFuncs.cls, a MathFuncs.cls and a DrawingFuncs.cls.
Then open a new VB project of type ActiveX dll and add these class modules to it. Using the project properties give it a sensible name and then do Project:Make to compile the DLL.
In your client apps you need to instantiate each class, perhaps using a global object thus:
Dim myMathFuncs as MyDll.MathFuncs
and you need to initialise the object before you can use it thus:
set myMathFuncs = new MyDll.MathFuncs
Don't forget to release any dll references before you close your client app thus:
set myMathFuncs = nothing
Hope this helps,
Duncan
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
Check out the new downloads - ImageMap.ocx is the VB control that emulates an HTML image map, EventVB.OCX for adding new events to your VB form and adding System Tray support simply, MCL Hotkey for implemenmting system-wide hotkeys in your application...all with source code included.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.