Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Register an Active Form with an application

Posted on 2005-03-13
Medium Priority
Last Modified: 2013-11-17
Hi, thanks for trying to respond to my question.

I work with C++ Builder 6.0 Enterpise on WXP.

The problem is, i need to draw a graphic (chart) and make it distributable to execute on another machine on Win NT like OS.

So, i wrote the code, got an ActiveX Chartfx, and fill it. The graphics look very nice on my PC, but when trying to execute on a machine without Builder6, got errors like "dll not found". Then, i saved the dlls needed on the same folder and got messages like: "class not registered". Tried to use REGSRV32.EXE to register those dlls i had found earlier, but that didn't work.

I wondered if there was a library (.ocx) that Builder could generate to be registered manually.

Now i have made an Active Form that works on IDE but cannot be registered with my previous application because "it's not an ActiveX Library".

As i'm new on this, any advice will be appreciated.
Question by:epsa
  • 6
  • 4
LVL 25

Expert Comment

ID: 13529568
I got this off the ChartFX support newsgroup,

  You need to copy and REGISTER (COM using RegSvr32.exe or equivalent) the following dll's:
  CFX4DATA.DLL (if used)
  ANNOTATEX.DLL (if used)

Not sure if it directly applies.

What dll's is it not finding or are the problem?  Are there any other 3rd party components in the app?

It could be that you have not statically linked other dll's that are for Borland.  There are two places to check in the project options.  First the linker tab 'Use dynamic RTL' and under Packages the 'Build with runtime packages'.  Unchecking both of these will make your exe bigger but your exe will also run stand alone without requiring any dll's.  Try unchecking these and rebuild and see what happens.

An activeX will still need to be installed on every machine the program runs on.


Author Comment

ID: 13529966
I think the problem with the dlls' been solved. It says "class not registered"

I have already tried all those combination with: Release, use dynamic rtl, .. and didn't work.

What does mean ActiveX has to be installed?
I thought at least Win XP, 2000 and even 98 have those kind of ... libraries (?) included by default. Actually, there is not a problem to register the dll's you said, i think it could be done manually.


Author Comment

ID: 13529996
There are not 3rd party components. Just a form and chartfx components.

No dll you said were found on my PC.

Maybe i'm doing it wrong at IDE-level, building a chatfx on a standard form. Maybe the right way is creating a library or like.
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 13530053
Neither did i found Cfx4032.ocx, SfxBar.dll, Cfx4Fi.dll, Cfx4En.dll.

Expert Comment

ID: 13531865
First, compile your program with the following options:

Project->Options->Linker - uncheck use dynamic RTL
Project->Options->Packages - uncheck build with runtime packages
Make this the default by checking the box at the bottom of the screen. Personally, I prefer to have everything in one large package and use a splash screen while it loads, but if you don't mind having multiple files scattered around, then create an install program using the Installshield program where it knows which dlls to install and register. It will load faster.

Then copy the cfx32.ocx active-x component from {windows directory}\system32 to the {windows directory}\system32 directory on the box where you want to run the program. {Windows directory} is usually \windows or \winnt. This component actually contains the code to render and display the chart.

Install the program on the machine. It should run fine.


Author Comment

ID: 13532714
I found the cfx32.ocx and registered it.

Tried without InstallShield.

When the Project Options u said are deactivated, It throws "unknown interface" EOleSysError exception even on my IDE. So i don't think it will work on other systems.

So i guess InstallShield is necessary requiered. And, compile equals build, right?

Searching for InstallShield ...

Expert Comment

ID: 13532761
This means you are still trying to build the program with runtime libraries. Are you certain that the check box at the bottom of the packages screen is not checked? If so, please do Project->Build to rebuild the whole package. It should work. I have installed these files just by copying them to a new machine without any previous borland installations at all. If  it still won't work, I will try to duplicate it.



Author Comment

ID: 13532793
I'm certain.

It doesn't work. I mean, build is OK, but Run throws exception and Builder hangs.

Are you sure the components you refer are ActiveX?

Expert Comment

ID: 13532826
I just built an application using the chartfx active-x control and it works on my machine (That's what ALL programmers will tell you.) However, since you are having a problem inside the IDE, then something has gone wrong.

Can you run any other program inside the IDE?
Also, are you getting more info on the error, like what dll or module it is failing to load. The error you show is a failure to load a module. Often it is stdvcl32.dll. But on your machine with everything installed, it should not be a problem, normally.

If you would like to send me the source code, I can try to reproduce the error. I am using the same version Builder. You can zip them up and send them to barrydbrown@yahoo.com, or if they are too big, I can let you in over the VPN. If you need that, please email me.



Accepted Solution

barrydbrown earned 1000 total points
ID: 13541446
Ok, I was NOT able to figure out why it won't work without the packages. However, I did send you an installshield script to get all the needed files over for you. Let me know if it works, cuz I don't have any clean machines to test on.


Author Comment

ID: 13559401
The 2 base components that you normally need for Chart FX Client Server are SfxBar.dll and Cfx4032.ocx. If you are utilizing any other components like data provider, annotation etc., then you will need the appropriate dll on the computer.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question