Here
you can find the most common questions I get, and the answers I give. This
document itself answers from 80% to 90% of the questions I receive by e-mail so,
please, read it before contacting me. But if you don't find here the answer to
your question, or you just want to make some comments, please feel free to send
me a message.
How
to use an ActiveX or COM library.
Problems
registering a certain comment or when installing your application in another
machine.
VB5ES.DLL or VB6ES.dll not found.
.DEP file.
Problems
when finishing an application by calling the End statement.
Can I use your
component in my application for free?
Signed licenses to use my
components.
Donations.
Source code.
How can I use your library?
I tried to declare your library in my project, using DECLARE, but it doesn't
work.
I selected the library using the 'Components' option under the 'Project' menu,
but Visual Basic returns an error.
Well, the answer I normally give to these questions is: look for help in the Visual Basic help system. I would love to have time to answer more properly, but I'm afraid I don't. Anyways, that's why I'm writing this now.
An ActiveX or COM library is not the same an a standard one, so you don't use the Declare sentence to be able to access the library. What you need to do is the following:
1. Register the component in your system. You can do this by using regsvr32.exe, like regsvr32.exe Base64.dll. If the library registered correctly, you should see a confirmation message. Also remember that if you want to get rid of the library, to do it properly you should unregister it before deleting it, by using the regsvr32.exe with the /u modifier like regsvr32.exe /u Base64.dll. Then you can delete the file. You only need to do this in the computer you use to program, because any software you use to create the installation of your software should register and unregister COM components properly.
2. Add the library to your project. This is similar to adding a control but, instead of using the 'Components' option use the 'References' one, under the same 'Project' menu.
3. Once the library has been added to your project, you can access the classes that the library shares as if they were local (although you can't open their source code). To see what classes a particular component shares, you can use the object browser in Visual Basic. To use a particular class, you need to declare a variable as that class, like for example:
Dim B64 As Base64
Set B64 = New Base64
After this, the B64 object will have all the properties and methods of the Base64 class.
When
I try to register your component, it returns an error and says that it couldn't
register.
My application works fine in my machine and some others, but when I try to
install it in a particular machine it returns an error and says that your
component couldn't be registered.
Applications, controls and libraries created with Visual Basic need certain files called runtime files to be able to work. If the machine where you are trying to register the library or the control doesn't have these files, the component will neither register nor work. If you are using Visual Basic 6 to make your application and you are using one of my components that was compiled with Visual Basic 5 Service Pack 3, there are two things you can do:
The reason you don't have problems in certain computers is because those computers already have the needed files as another program installed them.
VB6ES.DLL is listed as a
dependency of your component, but I can't find that file anywhere (it could also
be VB5ES.DLL).
VB6ES.DLL and VB5ES.DLL are localized versions (Spanish) of a standard Visual Basic runtime file. For some odd reason, some installers complain when they don't find this file in your computer (among them the one that comes with Visual Basic), but it doesn't matter at all. If in your setup already included the proper Visual Basic runtime files, no matter in what language, the component will work.
Do I need to include the .DEP file in my application?
When
you are creating the install for your application, the installer will look at
that file to know what files need to be distributed with the component.
Therefore, you only need that file when you are creating the installation.
Anyways, it would be nice that you included the .DEP file so, if someone
installs your application and wants to use one of the components for his/her own
application, the .DEP file is already there.
When I call the End statement to finish my application by clicking on the AR Button control, or when the form uses the AR Form Extender control, the application gives an error or closes but stays in memory.
This is a problem for which I haven't found a proper solution yet. Anyways, you should know that finishing an application by calling the End statement is not the proper way to do it, because when you call End, code that is placed in Unload or Terminate events will not be executed, as the application is forced to terminate inmediatelly.
This is exactly what happens with these controls. When they start working, they subclass the form they are placed on, or even themselves. When you call End, they don't have the chance of unsubclassing them properly, so in a certain moment, when the operating system wants to send messages to the window it can't find the procedure to do it, as the control has already been unloaded without returning the control to the proper procedure.
The proper way to finish an application is by unloading all the forms and application-wide objects in memory, and when there are no more objects in memory, the application will finish itself. If you follow this method you will not have problems with my controls, as they will know when the application is terminating and will act accordingly.
You should also know that this is an issue that affects other controls too, not only mine, like database controls or those that need to save configuration parameters or whatever before terminating. If you finish your application by calling End, it might happen that some cached data or other information couldn't be saved to disk.
May I use
your component in my application for free? Even if it's a commercial application?
Yes. All the components you can find in my web are freeware. You can use them freely in any type of application, freeware, shareware or commercial, and you don't have to pay me anything.
The only thing I ask for is some credit in the credits window of your program, and a direct link to my web page when the application has Internet access. But, as much as I would like you to do this, you are not obligated to.
My
company needs you to sign this document in which you specify that we can freely
use your component and distribute it with our application.
Well, I'm a little tired of this. It's okay that I don't make any money out of this web, anyways I made these components for my own projects and if they are good for you too, great. But I don't want it to cost me the money of sending faxes all around the world. I have been very clear about the legal status of my components, so if your company needs any additional paper for you to be able to use my components in your projects, there are two things you can do:
Under no circumstances I'm going to keep sending faxes with signed agreements.
Well, no if they are monetary. A nice donation would be a copy of whatever you programmed using my components, so I can take a look at it. I love it when people send me nice stuff.
I'm learning how to program and I would like to take a
look at the source code of your component. Could you please send it to me?
I want certain things to be modified in your component for me, but I understand
that you must be very busy and will not able to make them for me. If you send me
the source code I will be able to make the changes myself.
My company doesn't allow us to use components of which we don't have the source
code, because maintenance reasons. Could we please have the source code of your
component?
Well, no. What I give for free is not the source code, but a compiled library. If you want to have the source code for a specific component, I can sell you a license so can use it in your program. For USD $200, you can have the source code of any of my components, except in the case of the AR Crypto Library, to which this price is applied per algorithm. If you want to do this, send me a message and I will send you back my account information so you can wire the money. Checks will not be accepted, just transfers to my account.