Link to home
Start Free TrialLog in
Avatar of mbristow_28
mbristow_28

asked on

Distributing an ActiveX listview control using IE4

I have written an HTML page for our (IE4 based) intranet and have included an ActiveX listview control (by dragging in a ListViewCtrl from the Visual Interdev Toolbox onto my page). This gives me an <OBJECT> tag and a listview that displays fine on my PC and (as far as I can tell) other PCs with VB installed.

The problem comes when I try to view the page on any other PC - the listview control just displays in IE4 as a graphic placeholder and the object isn't loaded.

Can anyone help?

For your information, I have already tried:

1. Including a "codebase" parameter so that the mscomctl.cab file is downloaded from the Microsoft web site if the listview's classid is not found on the client PC. The cab file appeared to be downloaded, but still no listview object.

2. Manually copying the mscomctl.ocx file from my PC to a test client PC and registering it with regsvr32. That didn't work either. I checked the registry and the listview's classid *does* appear in the client PCs registry, implying that the correct version of the listview control should now be on the client PC.
Avatar of hes
hes
Flag of United States of America image

I had the same problem with msflexgrid
Try the following:

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>
Avatar of cable4096
cable4096

For more information please consult this Microsoft web site:

http://support.microsoft.com/support/kb/articles/Q159/9/23.asp

Avatar of mbristow_28

ASKER

Thanks to cable4096 and hes for replying. I've spent probably about 6 hours trying to sort this out and finally it works! In addition, I'd spent many days building up my ASP pages, assuming that all the client PCs would have this listview control!

Since you both came up with the same answer, the points will go to the whichever one of you can tell me the best way to stop the 'yes/no/more info' form coming up - the form that says:

"The authenticity of this content cannot be verified, therefore it cannot be trusted The root certificate has not been enabled as a trusted root, do you want to install and run Microsoft Common Controls?".

I'd prefer for the control to install from the .cab file automatically in the background, rather than for the users to have to see this form.

(if neither of you knows the answer I'll toss a coin for the points!)

Thanks

Matt
Adjusted points to 210
ASKER CERTIFIED SOLUTION
Avatar of hes
hes
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Good one!

It turns out that the majority of my users won't see the 'root certificate' message, the ActiveX control will just install anyway. But the linked page you provided is nevertheless helpful.

Thanks

Matt