Distributing ActiveX components to client machines

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:


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

perhaps a tutorial?
Who is Participating?
Dave_GreeneConnect With a Mentor Commented:
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.

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.
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


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

'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


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


<!--     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">

<OBJECT ID="UserControl1"


14) Make the following changes (per this example)
   <OBJECT ID="UserControl1" Height="400" Width="400"  <--however big the control is
    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  :)

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

GrungeAuthor Commented:
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!
GrungeAuthor Commented:
I'm not writing a brandnew control at the moment.. Its a downloaded datepicker supplied as a dll & Ocx.
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  :)
GrungeAuthor Commented:
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.
Where is this control?
GrungeAuthor Commented:
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.
GrungeAuthor Commented:
I'm using this one now...it only requires the vbrunSp3
my problem is to distribute this..

GrungeAuthor Commented:
Some contradicting txt on the site:



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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.