Home · Register · Login · Contact

ActiveX Control FAQ

Visual C++ Specific

  
Question: Why are the property pages blank?
Answer: There are at least two ways to get to properties pages in VC++. Right-clicking the component produces a pop-up menu. The Properties item on this menu is a VC++ implementation of property pages. We developed a different mechanism that allows the user to watch changes as they are made (as opposed to pressing OK or Apply). For OUR property pages, follow the Object item and select Properties.

Question: What versions of Microsoft C++ do you support?
Answer: Our ActiveX (OCX) components are thoroughly tested under Visual C++ versions 4x, 5, and 6.

Question: Do you support Visual C++ v1.52?
Answer: Yes and No. Visual C++ version 1.52 is a 16-bit environment, so the ActiveX components will NOT work. Our VBX products, however, will work fine.

Question: I am trying to create one of your components dynamically. It runs fine on my machine, but when I install my program on an end-user's machine, I get a licensing error message. What am I doing wrong?
Answer: The components require a run-time license when instantiated. Normally, instantiation can be performed at design time by simply placing the component on a dialog rather than trying to "Create" the control dynamically at run time. However, there are occassions when developers are creating dialogs at run time and placing components on them. If you are doing something like this and absolutely cannot instantiate the component in your design environment, contact us and we can provide you with a run-time "license key" to use in the Create function - but only if you are NOT developing a container. If you are designing a true ActiveX or VBX container, then you will need to discuss a royalty arrangement with us.

Question: I just purchased an upgrade. What do I need to do now?
Answer: You need to regenerate your .cpp and .h, or "wrapper", files for the upgraded component. The simplest way to do this is to open a scratch project and insert the component(s) into the scratch project. Once you have your new wrapper files created, copy them to the directories of your existing projects and overwrite the old wrapper files. Finally, open your old projects and recompile them.

Question: How do I load a picture property at run time?
Answer: The following sample code illustrates how to use a dialog box to locate a picture at run-time and load the picture into the Moving Map's MapPicture property. The sample code assumes that the user clicks a button to launch the directory dialog. This method will work with any of the picture properties. Of course, you do not have to use the dialog box and can skip a great deal of this code if unnecessary. Pictures can be loaded at design time quite easily - without all this extra code! Pictures loaded at design time are compiled into the executable.
View Code Sample

Question: How do I use the AddXYArray method of Strip Chart?
Answer: This sample will do the trick. View Code Sample

Visual Basic Specific

  
Question: What versions of Visual Basic support ActiveX controls?
Answer: Visual Basic 4, 5, and 6 support ActiveX controls. ActiveX controls are 32-bit objects, so you must have a compliant development environment. Note that VB4 has both 16 bit and 32 bit development environments. The 32 bit development environment uses the Global Majic ActiveX (OCX) components. The 16 bit development environment uses VBXs.

Question: What versions of Visual Basic support VBX controls?
Answer: Visual Basic 3 and 4 support VBX controls. Note that VB4 has both 16 bit and 32 bit development environments. The 32 bit development environment uses the Global Majic ActiveX (OCX) components. The 16 bit development environment will use VBXs. Keep in mind, however, that the last modification of all Global Majic VBX components were made to conform to VB3.

Question: How do I load a picture property at run time?
Answer: Many VB users want to set their picture properties at run time and, ideally, would like it to look something like this:

  Object.PictureProperty = PICTUREPATH

Unfortunately, it doesn't work that way. The proper way to set pictures at run time is as follows:

  Object.PictureProperty = LoadPicture(PICTUREPATH)

General Instruments

  
Question: Why am I having problems registering instrumentation ActiveX controls on my machine?
Answer: You are missing one or more of the necessary OLE automation support DLLs. These DLLs should always be included in any installation that you build using Global Majic MFC ActiveX components. Install the DLLs BEFORE installing the ActiveX (OCX). The required DLLs are:

  • ASYCFILT.DLL
  • MFC42.DLL
  • MSVCRT.DLL
  • OLEAUT32.DLL
  • OLEPRO32.DLL
  • STDOLE2.TLB

Registration Instructions:

  1. Place all the above DLLs and the OLE type library in the system directory.
  2. Find the file Regsvr32.exe (it should be in the WindowsSystem directory).
  3. From the Start Menu select Run... and type "regsvr32 OLEAUT32.dll". Click OK. You will get a status report message box. An alternate method requires you to drag and drop the OLEAUT32.DLL file onto the Regsvr32.exe application to register it in the system registry.

  4. NOTE: You can make the procedure invisible to the end-user by utilizing the /s (silent) option (i.e. regsvr32 /s OLEAUT32.DLL).
  5. Repeat the previous step for the other DLLs listed above.
  6. Lastly, use the same procedure to register the Global Majic ActiveX components.

Question: If I am using an ActiveX container that you do not have listed on your Web site, will your components work in my environment?
Answer: Although we do not support these containers, we are constantly being told of environments that people are using our components that we never imagined. That is the beauty of OLE components and industry standards. If you are comfortable with a particular development environment and it supports ActiveX, download our shareware components and test them in that environment...they just might work.

Question: Can I load my copy of the Instrumentation ActiveX Library onto more than one machine?
Answer: A single purchase only licenses one machine. However, if you require the software on several computers, contact our sales department for information on site licenses.

Question: How do I report a bug?
Answer: Although we take great strides to ensure the highest-quality, bug-free, products, occasionally we do find bugs. Please report any bugs that you find to our support staff.

Question: Is the source code for the ActiveX components available for purchase?
Answer: Not at this time. However, you may purchase our VBX code.

Question: What is the difference between and ActiveX control and a VBX?
Answer: VBX components or custom controls are 16-bit OLE (Object Linking and Embedding) software used in 16-bit development ONLY. VBX components are very limited when compared to ActiveX. They must be installed somewhere in the Windows Path, usually the System directory. They cannot be registered with the system like ActiveX components can. VBXs have limited interfaces and do not support custom property pages. However, programmers who have to develop for users still running Windows 3.1 systems will have to use VBX components for their programming needs.

ActiveX components are 32-bit OLE software usually ending with the file extensions .ocx or .dll. ActiveX components are the next generation after VBXs. They are much more flexible than VBXs and support interfaces which VBXs do not, such as custom property pages. ActiveX components can be written in many different languages, including Visual C++ (which Global Majic uses as their development environment) and Visual Basic.

Question: Why am I having problems registering controls on my laptop?
Answer: Many laptop computers have a battery meter program that allows the laptop user to quickly view how much power is left in the battery. These battery meter programs do not show up in the task manager as running applications. Through much trial and tribulation, it was discovered that these programs typically utilize the OLE Automation libraries and if they are running, you cannot install the newer OLE Automation libraries onto the laptop. You must shut down the battery meter application in order for the installation to succeed. Usually the battery meter application will show up in the Taskbar on the lower right corner. If you double-click or right-click the icon for the battery meter, you should get some method of shutting down this utility.

Internet Related

Question: How do I distribute component(s) to the target machine?
Answer: We are providing the following information for users who decide they would like to use our components for Internet or Intranet applications. It is actually information extracted from the Microsoft Developer Network regarding ActiveX components. In many places the information below references older versions of their DLLs and development tools. Be aware that these change and that information regarding the actual DLLs that you need to include are provided in the release notes if you are a registered user. Note that all Global Majic ActiveX components are digitally signed and marked as "safe for download". View Information

Question: What issues are involved when using Global Majic's Instrumentation ActiveX components in Web applications?
Answer: Global Majics Instrumentation ActiveX components are written using the Microsoft Foundation Classes (MFC). Although these components function properly in Web page applications, an interesting issue is raised: dependancy files. Both the component and the support files must be supplied when writing an application using an MFC ActiveX. MFC support files are quite large, making download times an issue. Many of our customers, however, have decided that this was not a major issue, either because they are writing an Intranet application or their clients do not have bandwidth issues. The bottom line is that our instrumentation components work well, but since they are MFC-based, be mindful of download times.

NOTE: 3DLinX products are written with Microsofts ActiveX Template Library (ATL) and therefore have no dependancy files.

Question: How do I get my component to use images?
Answer: Include the image in your cab file. Have the cab file put the image in a specific directory that you know will be on the user's machine. The root directory (C:) is a good directory to use. Now include the following VBScript in your page.

<SCRIPT LANGUAGE="VBScript">
<!--
    Sub Window_onLoad()
        Set AGauge1.BackPicture = LoadPicture("C:Clouds.bmp")
    End Sub
-->
</SCRIPT>

Question: How can I hide the imageless component until the image is loaded?
Answer: You can hide the component in Internet Explorer. In the case of the example provided below, it is the Angular Gauge. First, follow the cab file instructions, then add the component to your page and surround the component with opening and closing DIV tags. The opening DIV tag should look like this:

<DIV ID="agauge" STYLE="visibility:hidden;">

Now add the following code to your page.

<SCRIPT LANGUAGE="VBScript">
<!--
    Sub Window_onLoad()
        Set AGauge1.BackPicture = LoadPicture("C:Clouds.bmp")
        agauge.Style.Visibility = "visible"
    End Sub
-->
</SCRIPT>

Question: How do I get my component to react to mouse-clicks?
Answer: If the component supports mouse-clicks (as in the case of our LED control used below), add the following VBScript to your page:

<SCRIPT LANGUAGE="VBScript">
<!--
    Sub LED1_Click()
        If LED1.Value = 0 then
            LED1.Value = 1
        else
            LED1.Value = 0
        End If
    End Sub
-->
</SCRIPT>

Recently Visited Products