Solved

Distributing ActiveX components to client machines

Posted on 2001-07-18
13
486 Views
Last Modified: 2013-11-18
I've so far found out that I need the files in a cab file.
I've never used a cab file b4.. it currently contains an OCX and a related DLL. Do I need to make an INF file for this cab?...

this is part of the ACTIVEX object tag in the code:

codebase="datepicker.cab"


...so how do i distribute ACTIVEX objects via my page?

perhaps a tutorial?
0
Comment
Question by:Grunge
  • 6
  • 6
13 Comments
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6293990
Well you need to have the signed with Verisign.  You can build the .cab file using VB's Package and Deployment Wizard by selecting the internet deployment option.
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6294002
Here is a listing of steps to be taken to ensure you are building your OCX correctly

1) Create an OCX Project (ActiveX Control)
2) right click your control, select add UserControl, then when you get into the VB dialog where you

normally select a usercontrol, select the wizard.
3) Add the Property you want to expose eg (Message) "My Custom Members" in the wizard
4) doesn't map to a control
5) When you get to the set attributes page, set Message to a string.

Your New Control Should Look Like this

'CODE BEGIN

'Default Property Values:
Const m_def_Message = "Empty Message"
'Property Variables:
Dim m_Message As String
'Event Declarations:

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MemberInfo=13,0,0,Empty Message
Public Property Get Message() As String
Message = m_Message
End Property

Public Property Let Message(ByVal New_Message As String)
m_Message = New_Message
PropertyChanged "Message"
MsgBox "Here is the Message you passed [" & m_Message & "]"
End Property

'Initialize Properties for User Control
Private Sub UserControl_InitProperties()
m_Message = m_def_Message
End Sub

'Load property values from storage
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
m_Message = PropBag.ReadProperty("Message", m_def_Message)
End Sub

'Write property values to storage
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("Message", m_Message, m_def_Message)
End Sub

'CODE END

6) Build your OCX
7) set binary compatibility on the control in the projects properties.
8) Add a standard EXE to your project group
9) Place the Control onto form1.
10) Check to see if the value you set in the controls property page (on form1) actually change the value,



if so proceed.

If not, it's time to write a comment on EE stating so. (listing the control code)
11) it worked!  yahoo!  Now build your OCX again just to be certain you have any changes
12) Use the Package and Deployment wizard to build the deployment
- Using the "Internet Package" option
- Take the defaults until you get to the "Safety Settings" tab, you will select "NO" for Safe for

Scripting, and

"YES" for safe for initialization.
- Now you are finished... with this step
13) now look into the directory where you built the package. you should see projectName.htm, open it


It should look something like this

'HTML BEGIN

<HTML>
<HEAD>
<TITLE>Project1.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="LPKfilename.LPK">
</OBJECT>
-->

<OBJECT ID="UserControl1"
CLASSID="CLSID:291EACFF-517D-4B6C-9EF0-A329A541AD8C"
CODEBASE="Project1.CAB#version=1,0,0,0">
</OBJECT>
</BODY>
</HTML>

'HTML END

14) Make the following changes (per this example)
   <OBJECT ID="UserControl1" Height="400" Width="400"  <--however big the control is
 CLASSID="CLSID:291EACFF-517D-4B6C-9EF0-A329A541AD8C"
 CODEBASE="Project1.CAB#version=1,0,0,0">
    param name="Message" value="Your New Message here!"
15) Save your changes and run the projectname.htm
16) If it works great, if not... time to comment again  :)

Cheers!  
0
 
LVL 1

Author Comment

by:Grunge
ID: 6294089
Give me a while to go through all that... but while I do let me just say from first glance that seems to be the most helpful and concise answer i've ever recieved!
0
 
LVL 1

Author Comment

by:Grunge
ID: 6294136
I'm not writing a brandnew control at the moment.. Its a downloaded datepicker supplied as a dll & Ocx.
0
 
LVL 3

Expert Comment

by:newjack
ID: 6294418
listening...
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6294423
Then it should be relatively simple, provided they have already signed the control!  If you can find a page where it is used you can just copy and paste the declarations it uses.  It will usually point to a .cab file that resides on the owners server... that way updates occur automatically

Cheers  :)
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Author Comment

by:Grunge
ID: 6297235
I can't find a page that uses it. The development page I downloaded it from hasn't been updated for a year or so.
http://www.mvps.org/ccrp/
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6298224
Where is this control?
0
 
LVL 1

Author Comment

by:Grunge
ID: 6301352
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6302645
Ok, you are going to have problems with this one.  

1) you didn't create it.
2) the person who did may or may not have had it signed.
3) you may have to pay for the control.

You could wrap the DLL & OCX up in your own CAB file, but the control will never be signed, and some browsers are set to reject unsigned controls.

I would send the guy an email asking him what his intentions are with this control, who knows maybe he's gotten it signed and it's available... or maybe he'll give you the code... never know.
0
 
LVL 1

Author Comment

by:Grunge
ID: 6316764
I'm using this one now...it only requires the vbrunSp3
my problem is to distribute this..

http://hjem.get2net.dk/vcoders/cm/resources/vcdtp.htm
0
 
LVL 8

Accepted Solution

by:
Dave_Greene earned 85 total points
ID: 6316799
From the readme.txt file in the cab

Installation Requirements:
vcDTP requires Visual Basic 6 with at least Service Pack 3 applied
and Ssubtmr.dll by Steve McMahon (http://www.vbaccelerator.com)

This site mentions also...

If you wish to distribute the source code files by any other means (i.e. if you want to include it on a CD or any other software media) then the EXPRESS PERMISSION of the author is REQUIRED.


So it's at this point I need to ask you what you intend to do with this control?  If you are going to build your app around it, you are going to need to get permission from both parties... unless, if I read everything correctly... you can download the source code and rebuild the projects into newly named components.

If this is the case and you really want this control, I would get the soure code for both projects and integrate them into one control, rename the control and you have 'your' control.

Then you can either go to verisign and get a control signature, or you can just insist that the people using your controls accept activex controls in their browser options.

Thoughts?
0
 
LVL 1

Author Comment

by:Grunge
ID: 6317426
Some contradicting txt on the site:

http://hjem.get2net.dk/vcoders/cm/general/vendor.htm#Top

Also..

Release version: Made the DateTime Picker independent of Steve McMahons SSubTmr6.dll. This means that there are no dependencies execpt for the VB6 SP3 Runtime files.
........................................................

The only problem is distributing the VB6-SP3 Runtime files.

I have a link to it however client machines clicking on this actutally activate the .exe on the server

server is currently win98 with pws.

:?)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I made this because I wanted to get e-mail with a attached csv file so I'd would be able to import user input into a MS Excel template, but I also wanted to register/save all inputs from each day in a file on the server. 1st - It creates a temp C…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

743 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

11 Experts available now in Live!

Get 1:1 Help Now