I have two ActiveXs that were purchased with full distribution rights but
it
goes deeper than that and Albert hinted to that with "most activeX
controls
have a license scheme built in ". Let me explain more thoroughly for those
readers who may be new to this subject. To use an ActiveX in design mode
the
license file for the ActiveX must be in the same folder.
The above is not the normal case for activeX controls. Perhaps this
is some design or part of the activeX control you purchased, but that has
NEVER been the case for the vast majority of ActiveX controls. You don't
have to install them in the same directory as your running file (nor does
some type of license file need be installed in the same dir either).
In *most* cases as long as the activeX control is installed and registered
on your computer then when you go tools->references you will see that
activeX control appear in that VERY long list. Note that VERY long list is
all of the activeX components installed on your computer. You can use anyone
object from that very long list and none of those objects are in your
current
directory of the access application, and none require a license file. If
the activeX control has no licensing restrictions, then you can freely copy
it to another computer and simply register it. That copy restrictions is not
tied to some other license file.
If the activeX controls DOES requite a license on the target computer, then
the compiler such as VB6, c++ or whatever will actually imbed the license
part of the activeX control into the resulting .exe or .dll code you create
with that compiler. When the application tries to load the activeX control,
that control will not work unless it finds the licenses **inside** of the
..exe trying to execute that activeX. So, this is generally how the licensing
works (and, it means that other applications on the target computer will not
be able to use the activeX control).
With ms-access, since we not producing .exe files, then I have no idea where
the license key resides, and I suspect that during the registering process
the activeX control has to be attached to something (likely some clsid in
the
registry..and that comes from using an installer). In fact, this quite much
means that the standard licensing controls for activeX can't be used for a
mdb or accdb file. In other words, I can't see how the activeX can be tied
ONLY to your application when using ms-access. It not really possible to do
so. (However I suspect it could be attached to say that the activeX
will ONLY run from msacces.exe file).
Note that Microsoft changed the name activeX to "com" object automaton, and
they both really the concept and technology now (you can very much
interchange the name activeX or "com" object when speaking about this type
of object code...
As I understand it those are the
rules everyone uses in ActiveX making and distribution.
No, that not the rules even for the general computer industry.
Also, note that access will setup references for you anytime you drop in an
activeX control on a form...
Try the following:
Bring up a form in design mode, and lets add the calendar control to your
form.
So, when your form is in design , click on the activeX option on the ribbon
(design tab).
then, scroll down to the
Calendar control 12.0
(the above control is an optional control that ships with ms-access 2007, if
the above is not in the above list, then you have to grab your original
access 2007 install disk and install this optional component ).
Hopefully it is installed...simply select the control form the listbox, and
then hit ok..you see the calendar control on your form. Now, save the form.
Now jump into the code editor (ctrl-g). Now go tools->references ...and you
will see a a reference to the calendar control!!!
So, anytime you place activeX control in a form, ms-access will automatic
create and place the reference for you in the tools->reference list from
the
code editor...
BTW, a number of the references are DLLs. Am I correct that
OLB, TLB and OCX files are considered ActiveX files?
Usually ocx, olb are, but not necessarily .dlls. Many types of .dll's are
simply what we call static library code that is NOT written to activeX/com
standards. That means the this .dll code can be run (called) from your
application , but you not talking to this code via "com" automaton. This is
like
calling a subroutine in some code as opposed to automaton of some code like
when automaton word.
A common example seen in these newsgroups is Stephens pdf creator software.
That is a .dll, but not a automaton object. The same goes for the MANY cases
when you call windows api code. You simply calling a library of code that
sits
in a .dll file, but are not using automaton.
so, in Stephens code you see a definitions like:
Public Declare Function ConvertUncompressedSnapshot Lib "StrStorage.dll" _
(ByVal UnCompressedSnapShotName As String, _
ByVal OutputPDFname As String, _
Optional ByVal CompressionLevel As Long = 0, _
Optional ByVal PasswordOwner As String = "", _
Optional ByVal PasswordOpen As String = "", _
Optional ByVal PasswordRestrictions As Long = 0, _
Optional PDFNoFontEmbedding As Long = 0 _
) As Boolean
Note how the above api function defines the .dll in the above as
StrStorage.dll. These types of .dll's do NOT need to be registered on one's
computer.
The above requires that the .dll libraries be installed in the
windows\system32 folder. If it not found there, then the current .exe dir is
used (in our case that would be the location of ms-access.exe file, not your
accDB/mdb file).
In my case, for my access winZip library, I as a developer made efforts and
you don't have to copy my .dlls to the windows system32 dir or the
ms-access.exe dir. The .dlls simply have to be in the same dir as the
mdb/mde/accdb/accde file and this was done on purpose (and I got the idea
from Stephens code which also does this). You can grab my zipping example
here:
http://www.members.shaw.ca/AlbertKallal/zip/index.htm
There is some reading on licensing of activeX controls here:
http://msdn.microsoft.com/en-us/library/aa751973(VS.85).aspx