File Open Dialog

G

Guest

As a lot of us might now, the input file (aka browse button) in html does not
allow for multiple file selection or for filtering file types. The File Open
dialog used in WinForms allow these things and more.

I developed a windows user control in VB.NET with a button and File Open
Dialog, which allows multiple file selection. I registered the assembly with
regasm.exe and call the object from the html page with the object tag:

<OBJECT id="MyWinControl1" codeBase="Cab2.cab"
type="application/x-oleobject" height="280" width="480"
classid="CLSID:28766FA7-91E9-3A61-BC65-1981B6E6E840"
VIEWASTEXT></object>

When i run the page locally it works because the object is registered, but
when the page is ran from a computer that does not have the assembly
registered i get the little x icon in the browser. I thought the codeBase
will execute and prompt the user if they wanted to install the software, but
it doesn't.

Am I doing something wrong? Should the codebase reference the dll directly?
Should i use a different approach? Is this possible? If it was possible and
someone would help me make this work, would the user need to have the
framework installed in their machine?
 
B

bruce barker

cab files are used with an install and IE uses the interal inf file. the cab
file also must be signed. you can reference the dll directly if it has no
other dependences. the user will still have to trust your site to get the
download, and must have the framework preinstalled.

-- bruce (sqlwork.com)


| As a lot of us might now, the input file (aka browse button) in html does
not
| allow for multiple file selection or for filtering file types. The File
Open
| dialog used in WinForms allow these things and more.
|
| I developed a windows user control in VB.NET with a button and File Open
| Dialog, which allows multiple file selection. I registered the assembly
with
| regasm.exe and call the object from the html page with the object tag:
|
| <OBJECT id="MyWinControl1" codeBase="Cab2.cab"
| type="application/x-oleobject" height="280" width="480"
| classid="CLSID:28766FA7-91E9-3A61-BC65-1981B6E6E840"
| VIEWASTEXT></object>
|
| When i run the page locally it works because the object is registered, but
| when the page is ran from a computer that does not have the assembly
| registered i get the little x icon in the browser. I thought the codeBase
| will execute and prompt the user if they wanted to install the software,
but
| it doesn't.
|
| Am I doing something wrong? Should the codebase reference the dll
directly?
| Should i use a different approach? Is this possible? If it was possible
and
| someone would help me make this work, would the user need to have the
| framework installed in their machine?
 
G

Guest

Ok, I created the cab file and inserted the WinControls.dll and WinControls.inf

I used this tutorial:
http://msdn.microsoft.com/library/default.asp?url=/workshop/components/activex/packaging.asp

INF Content
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[Add.Code]
WinControls.dll=WinControls.dll
[WinControls.dll]
file-win32-x86=thiscab
clsid={28766FA7-91E9-3A61-BC65-1981B6E6E840}
FileVersion=1,1,4322
RegisterServer=yes

I then signed the CAB File with this tutorial:
http://support.microsoft.com/kb/247257/EN-US/

When running the web page from a client computer I get the prompt to install
it. I click yes and then i get the red x.

What am I doing wrong? Is it the inf file? is it that the cab file does not
contain an exe to install?

JoNaS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top