Solved

Active X Control

Posted on 2000-02-24
20
222 Views
Last Modified: 2013-11-25
Hi,

I have made an Active X control, that
reads data from the data base, does some modifications and displays the data.
I am using asp's to view the ocx control.This ocx control works very well on the m/c i created it, but if i open the asp page from some other page i dont get anythig.(Have to something like cab file but dont know how).
My question is :
1.How can i make it possible for all the clients to view this ocx?
2.If it picks values from the data base on the server will it work for the clients that access the website,by that i mean will it display the values from the server?
0
Comment
Question by:jkunal
  • 12
  • 4
  • 3
  • +1
20 Comments
 
LVL 3

Expert Comment

by:MTroutwine
ID: 2554209
You need to create an Internet Setup Package using the Package and Deployment utility provided with VB.  This creates and 'Internet Component Download' and allows the browser to uncompress and install the ActiveX component, it will also check security on the component.  You will have to add an <OBJECT> tag to your web page similar to this to download the component:

<OBJECT ID="MyControl"
CLASSID="CLSID:XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXX"
CODEBASE="MyControl.CAB#version=1.0.0.0">
</OBJECT>

The P&D wizard will walk you through creating the package and will question you on how you want to handle security with options such as Authenticode, Safe For Scripting, etc..  The wizard will also allow you to select where the component CAB file and associated files will be stored for downloading.

Once you run the wizard and have the package setup you should be set to go.

:>)
0
 
LVL 4

Author Comment

by:jkunal
ID: 2554279
Thanks MTroutwine,
will check it out tomorrow morning from office and if it works you will surely get your deserved points.

Thanks Any Way

Kunal :->
0
 
LVL 4

Author Comment

by:jkunal
ID: 2554352
Thanks MTroutwine,
will check it out tomorrow morning from office and if it works you will surely get your deserved points.

Thanks Any Way

Kunal :->
0
 
LVL 4

Author Comment

by:jkunal
ID: 2554885
Hey i followed  u r instructions and got an htm file along with the cab file
i copied the htm file on my web server
and ran that htm file from another m/c but still did not get the ocx component
can u help?
0
 
LVL 20

Expert Comment

by:hes
ID: 2555238
You also need to do 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>




0
 
LVL 4

Author Comment

by:jkunal
ID: 2556954
hes
i cannot find the lpk tool.
Please help

0
 
LVL 4

Author Comment

by:jkunal
ID: 2557319
Hi Again, I followed what you people had said but still no luck..

This is my Htm page....

<HTML>
<HEAD>
<TITLE>admins.CAB</TITLE>
</HEAD>
<BODY>
<!--      If any of the controls on this page require licensing, you must
      create a license package file. Run LPK_TOOL.EXE to create the
      required LPK file. LPK_TOOL.EXE can be found on the ActiveX SDK,
      http://www.microsoft.com/intdev/sdk/sdk.htm. If you have the Visual
      Basic 6.0 CD, it can also be found in the \Tools\LPK_TOOL directory.

      The following is an example of the Object tag:
-->
<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331">
      <PARAM NAME="(IP)/control/" VALUE="admin.LPK">
</OBJECT>

<OBJECT ID="admin"
CLASSID="CLSID:3068DCCA-E474-11D3-B333-00104B219AE3"
CODEBASE="admins.CAB#version=1,0,0,0">
</OBJECT>
</BODY>
</HTML>

But i still cannot make it work on a client m/c.
i even set the security to low in my IE
:-<
0
 
LVL 3

Expert Comment

by:MTroutwine
ID: 2557901
Many thanks to hes for adding the code I had missed!

jkunal,

Have you ran the LPK_TOOL.EXE?  If you are running Visual Studio Enterprise this file is located on Disk #3.  

Reference: PRB: Visual Basic Files Are Missing From Common\Tools Directory
http://support.microsoft.com/support/kb/articles/Q191/5/46.ASP

This executable will create the license package for your component.  If you have done all of this then I would reject my answer and see if someone else has any ideas!  

:>)
0
 
LVL 20

Expert Comment

by:hes
ID: 2558155
jkunal,
I think the param name is incorrect
it should be "LPKPath"

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

Author Comment

by:jkunal
ID: 2563905
hes thanks for the article,
did the changes (LPKPath) but it still does'nt work
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 4

Author Comment

by:jkunal
ID: 2565220
Does my active -x control also requires digital signing??
I am getting confused in this active-x
control registering..........
0
 
LVL 4

Author Comment

by:jkunal
ID: 2569190
sorry MTroutwine but i need a answer on this soon......
0
 
LVL 20

Expert Comment

by:hes
ID: 2569750
jkunal,
Please post the code as you have it now.
0
 
LVL 3

Expert Comment

by:MTroutwine
ID: 2570373
That's fine I would like to see the problem resolved, as per hes' request can you post your code?
0
 
LVL 4

Author Comment

by:jkunal
ID: 2571534
Hi hes,MTroutwine here is the code....

<HTML>
<HEAD>
<TITLE>admins.CAB</TITLE>
</HEAD>
<BODY>
<!--      If any of the controls on this page require licensing, you must
      create a license package file. Run LPK_TOOL.EXE to create the
      required LPK file. LPK_TOOL.EXE can be found on the ActiveX SDK,
      http://www.microsoft.com/intdev/sdk/sdk.htm. If you have the Visual
      Basic 6.0 CD, it can also be found in the \Tools\LPK_TOOL directory.

      The following is an example of the Object tag:
-->
<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331">
      <PARAM NAME="LPKPath" VALUE="admin.LPK">
</OBJECT>

<OBJECT ID="admin"
CLASSID="CLSID:3068DCCA-E474-11D3-B333-00104B219AE3"
CODEBASE="admins.CAB#version=1,0,0,0">
</OBJECT>
</BODY>
</HTML>
0
 
LVL 20

Expert Comment

by:hes
ID: 2573128
jkunal,
is the admin.LPK in the same directory as the html file, that is how you have your VALUE= coded.
0
 
LVL 4

Author Comment

by:jkunal
ID: 2573181
Yep hes,

And i had a strange experience,
i copied a ocx from microsoft site and then registered and made a CAB file and it worked fine on the client machine..
Now i make my own ocx and do the same thing and it doesnt work, so i just made a ocx with a text box and a button.
When you click on the button you get 'HI' displayed on the text box.
Now i did the same regs etc etc for my new control as i did for the MS control but still my control didnt work....

Is it that you have to add something to the ocx file??
0
 
LVL 4

Author Comment

by:jkunal
ID: 2573228
Now i know how export a Active-X, even though mine doesnt work,
Thanx to you MTroutwine And hes.
I will keep this qusetion open add another two question with 50 points each for MTroutwine and hes for helping me out.

0
 
LVL 4

Author Comment

by:jkunal
ID: 2576291
hes,MTroutwine please suggest something..
I need this working by Monday.
Please....
0
 
LVL 2

Accepted Solution

by:
anupvijay earned 100 total points
ID: 2622800
hi,
i you have a problem with the registering of yuor ocx component
Check it out
Anup
 

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Before we dive into the marketing strategies involved with creating an effective homepage, it’s crucial that EE members know what a homepage is. In essence, a homepage is the introductory, or default page, of a website that typically highlights the …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

707 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now