Writing an activex.dll takes a little getting used to, but there is
plenty of help available. What you need to learn, mostly, is how to
create class modules. If you already know how to do that, all you need
to do is select the type of application to create when you start.
The most important part of writing class modules is the use of
properties, most of which should be "public" to be of any use. There
are two type of "procedures" that are used, a property "let" (which sets
the value of a private variable) and a property "get" (which retrieves
this value). You need to use a property "set" instead of a "let" if the
property is an object type.
A very much simplified class module might contain the following (note
that I am writing this from a friend's computer, without syntax
checking, so use it with care):
Private m_Color as integer
Public Property Get Color() as Integer
Color = m_Color
End Property
Public Property Let Color(ByVal vNewVal as Integer)
m_Color = vNewVal
End Property
If the above code was in a class module called "Crayon", you could use
it in an application like this, after compiling the DLL and setting a
reference to that file:
Dim xCrayon as New Crayon
Dim Xcolor as Integer
xCrayon.Color = 4 ' This executes the property "set"
Xcolor = xCrayon.Color ' Executes the property "get"
You can also use enums to set integer values to string constants.
Hope this helps, and happy holiday!!
Martin