Activex Exe/Dll Development Example With Code
3. Develop an ActiveX EXE file, with an example
Here we develop a simple ActiveX EXE with just one form. The name of the ActiveX component is clsActivexEx. The example is chosen to demonstrate the use of ActiveX EXE in conjunction with Standard EXE. We will develop a Standard EXE later.
The example provided is simple. It works like this: You select either numbers or alphabets in the Main (Standard EXE). The selection (number/alphabet but not both) is passed on to the ActiveX EXE. Now, in the ActiveX EXE, you select specific number (say "2") or alphabet (say "A"). That specific number or alphabet is again passed back to the Standard EXE. It is similar to, say, the Standard EXE selects either birds or animals. If the Standard EXE chooses birds, then the ActiveX EXE can choose any one of a given set of birds. It doesn't have the option to choose any animal (because the Standard EXE already chosen birds). The selected bird is passed back to the Standard EXE. The example makes it clear as you read on.
1. Open Visual Basic 6.0 - it should be on your start menu if you have just installed it Programs -> Microsoft Visual Basic 6.0 -> Microsoft Visual Basic 6.0
Open an instance of Visual Basic Choose ActiveX EXE and select Open.
Fig: activex-1,Dialog Box showing the type of project to open