Distributing MSChart & using in IE 5.0

I want to use the MSChart ocx and embed it in a web page.   On my DEVELOPMENT machine (Frontpage, VC++ 5.0, VB 5.0, etc) everything appears to be working wonderfully.

The web page has an <OBJECT> tag with the MSChart class id and CODEBASE referring to http://activex.microsoft......./MSChart.cab

Now, on my TEST machines (one NT 4.0 sp5 & one Win 98) when I open the web page, a dialog pops up asking about DL and running signed control MSChart blah blah.   I click OK, and the MSChart control is installed on the test machine(s).   (ALL machines are running IE 5.0).  However, IE does not display the MSChart control, but instead simply shows the box with the crappy red "X" indicating that the control failed to load and run.

I know what you are thinking - possibly the control was not registered.
- Nope, the control was correctly registered on both test machines.

How about this one - possibly dependent DLLs and OCXs were not installed.
- Nope, it would appear that all dependent DLLs and OCXs were also installed.   It actually turns out that the the MSChart control is not dependent on any other DLLs or OCXs.

Could I be wrong about no other dependent OCXs or DLLs?
-Possibly, but when I ran IE through Visual C++, I noticed that no other pertinant DLLs were loaded.  

What about the VB runtime DLLs?
-Installed those for good measure.

At this point I wrote both a VB exe and a VC++ exe that creates a MSChart control USING THE VISUAL TOOLS.   i.e, in VB I plopped a MSChart control on a VB form and I did the same for the VC++ exe.   Guess what - it worked on both the DEVELOPMENT and TEST machines.

With this in mind, I created a new dialog based VC++ project and attempted to create an instance of the MSChart control using CWnd::CreateControl.  It worked on the DEVELOPMENT machine but didnt work on either of the TEST machines.

Now, at this point I became VERY frustrated, so I installed VB 5.0 on the NT 4.0 TEST machine.   Guess what happened...it worked (both the web page and the aforemention example (the CWnd::CreateControl one) that previously failed)! <grumble>  I figured that it worked with VB 5.0 installed - lets uninstall VB 5.0 from the TEST machine and attemped the to run the test again.   It continued to work (of course many of the VB 5.0 dlls and registry changes were intact even after I performed the uninstall).

So, here is what I am left with.

1.   MSChart is easily redistributable when it is placed on a dialog or form.
2.   CWnd::CreateControl doesnt work with MSChart unless VB 5.0 has at one point been installed.
3.   VB 5.0 install does some registry magic or installs some dependent DLL that I am not aware of.
4.   Apparently, there is some difference (as far as ActiveX and COM is concerned) between placing an ActiveX control on a dialog (form) and creating one programmatically.
5.   I am going nuts trying to solve this problem.
6.   Depending on the responses to this question, I willing to up the ante on this question to a great number of points.

Thank you all in advance for your responses.

Sincerely,

~Yoffe
yoffeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mark2150Commented:
*Toss* the M$Chart control. You can write your own graphics easily using nothing more complex than a PictureBox. This will both lighten the install, give you better quality output, give you the ability to print and completely eliminate the hassels you're having.

If you use the .Scale and .Line commands in a PictureBox you can rapidly duplicate all of the functionality of the M$Chart control and even go beyond it's limitations.

M
0
hesCommented:
VB activeX controls are licensed for the development box only. IE's license manager will not display a unlicensed control. You have to create a .LPK file from the tool
lpk_tool.exe located on the vb install cd under common/tools/vb/lpk, then install that file on the server running the htmp page and add the following code to the html page
 <object CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331"   width="50" height="50">
    <param name="LPKPath" value="FileName.lpk">
  </object>
0
yoffeAuthor Commented:
Very nice ANSWER, hes - worked like a charm.   For a 50 point bonus, if I set CodeBase for the MSChart control to:

CODEBASE="http://activex.microsoft.com/controls/vb5/MSChart.cab"

will I get all the MSChart control dependencies?   If not, what dependencies am I missing?
0
hesCommented:
Yes you will, I checked when I had the same problem with msflexgrid on one of my pages. All the dependencies were there.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
biajiCommented:
hi, yoffe
   send your solution to me , ok? my email address is  y1_abc@263.net

Regards
 
Biaji
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.