Solved

activex folder upload

Posted on 2001-07-25
13
339 Views
Last Modified: 2013-12-20
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.

Thanks

-Jon
0
Comment
Question by:punkrider
  • 9
  • 4
13 Comments
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6319765
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6319777
A few here...

http://ftp.monash.edu.au/pub/winnt/programr/

{Search for {"Upload"}
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6325004
How's this coming?
0
 

Author Comment

by:punkrider
ID: 6327495
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?  

THanks,

-Jon
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6327703
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?
0
 

Author Comment

by:punkrider
ID: 6335899
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 be...how 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.

THanks,

-Jon
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 8

Accepted Solution

by:
Dave_Greene earned 300 total points
ID: 6337756
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

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

***********************************
This is how you post back.
UserControl.Hyperlink.NavigateTo "http://www.your.asp?MadeIt=true"
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6337763
<<.  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.

Cheers
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6346568
How's it coming?  Questions?
0
 

Author Comment

by:punkrider
ID: 6346843
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,

-Jon

ps. I'll up the points even more after I get finished and then give them to you...
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6346897
Cool, I'll be on tonight a little bit, so just holler with questions.

dave
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6356719
How's it going?
0
 

Author Comment

by:punkrider
ID: 6365401
Dave,

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

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

Suggested Solutions

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

747 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

9 Experts available now in Live!

Get 1:1 Help Now