activex folder upload

Has anyone ever stumbled upon an activex control that would allow client side uploading of folders and their entire contents (including subfolders and files).  

It need only work on > IE 5 machines.


Who is Participating?
How about this...

This is how you build controls to work on the web.

Ok, here is the step by step example.

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, 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  :)

This is how you post back.
UserControl.Hyperlink.NavigateTo "http://www.your.asp?MadeIt=true
A few here...

{Search for {"Upload"}
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

How's this coming?
punkriderAuthor Commented:
I looked at all of those links that have been posted, but they are mostly for doing uploading through ASP.  I am need something that will allow uploading of entire folders by clicking on the folder and uploading through HTTP or FTP (seems the safer bet at the moment).  I have started to write my own activex control and it's coming along ok.  I decided to use the Wininet DLL that IE supplies as it is a specific solution to a problem.  Do you have any good links about developing ActiveX --> ASP communication controls?  


So you need information about communicating from and activex control (OCX) from an HTML page to ASP?  or Directly from a client OCX to ASP?
punkriderAuthor Commented:
I need to pass in the hostname of the server that the activex control was loaded from so that I can use the wininet dll to do some ftp uploading.  I have tried to use the property elements and use the param tags within the object tag, but I haven't had any sucess yet.  All of the examples I have found mention some add-in in VB that I don't have access to for some reason or another.

My question now would do you pass a variable from the containing asp page into the control.  IE> what are the necessary declarations and property items to be able to do:

< object classid="23423" >
< param name="host" value="bob" >
< /object >

where this code would set a variable inside of the activex control.

Also eventually I will need to be able to communicate back to the ASP page that the control is loaded from (ie. reverse of above situation).

Any help is appreciated. I'll increase points if you help me out.


<<.  All of the examples I have found
mention some add-in in VB that I don't have access to for some reason or another.>>

Find your Wizards directory in VB  (mine is here: <D:\Program Files\DevStudio\VB\Wizards>)

Register everything in this directory DLL's OCX's

Reopen VB and you have every Addin available for that version.

How's it coming?  Questions?
punkriderAuthor Commented:
Well...This seems to be coming along quite nicely.  Not too bad for my first activex web control.  Thanks for all your help so far.  I registered the DLLs in the VB folder and the addin appeared.  After adding the necessary properties to the project and using that wizard, I created the package with the deployment wizard.  This worked great until I put in the param tags... then the control disappeared.  After reading your last paragraph I added the height and width attributes and it works.  What a stupid default action.  I wonder why it works without any param tags and then disappears if you don't specify height and width?  Weird.

Well I am hoping to complete this tonight and I'll post more soon.

Thanks again,


ps. I'll up the points even more after I get finished and then give them to you...
Cool, I'll be on tonight a little bit, so just holler with questions.

How's it going?
punkriderAuthor Commented:

Thanks for all of your help.  These points are much deserved.  A good post for someone else to wander through later also.  Thanks again,

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.