473,405 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

File Open Dialog

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?
Nov 19 '05 #1
3 2288
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)
"JoNaS" <Jo***@discussions.microsoft.com> wrote in message
news:0A**********************************@microsof t.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?
Nov 19 '05 #2
ok, then how do i create the inf and install files?

JoNaS

"bruce barker" wrote:
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)
"JoNaS" <Jo***@discussions.microsoft.com> wrote in message
news:0A**********************************@microsof t.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?

Nov 19 '05 #3
Ok, I created the cab file and inserted the WinControls.dll and WinControls.inf

I used this tutorial:
http://msdn.microsoft.com/library/de.../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

"bruce barker" wrote:
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)
"JoNaS" <Jo***@discussions.microsoft.com> wrote in message
news:0A**********************************@microsof t.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?

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Alok Joshi | last post by:
I am trying to code the functionality of a file open dialog box in Access 97 using VBA. I tried following Microsoft KB article 96114 but when I run it in Access 97 I get the message commdlg.dll...
2
by: Jim | last post by:
I am trying to import a file using a file spec from the Access File Open dialog... I have been out to http://www.mvps.org/access/api/api0001.htm to look at the code, but because I'm not a guru, I...
2
by: Lonnie | last post by:
I need to implement a simple file open dialog in my form application (C++ .NET). I know there has to be a canned version of this dialog somewhere that I can simply use, but where? How? All the...
5
by: Krishna | last post by:
Hi I want to open the file open dialog box when i click the asp.net button and when i select the particular folder, i want full path in the textbox besides it is there anyway we can accomplish...
0
by: John Clark | last post by:
Hi, I am using webbrowser control to automate a site. this site contains form with tage <INPUT TYPE=FILE ...> I know the control is not writeable. So, only thing that I could do was: ...
5
by: charles | last post by:
I have a question about the file Open dialog box. I would like to be able to make the dialog box bigger by selecting the bottom right-hand corner and dragging/expanding the box. I am told by...
1
by: jhaek19 | last post by:
HI, how can show the file open dialog box... i dont want to use the <input = "file"> object, i suggest a different style...
1
by: ahammad | last post by:
Hello, I need to customize a standard File Open dialog box so that when DoModal is called, the dialog box opens to a certain directory and already has preselected a file. ...
2
by: aine_canby | last post by:
Hi, I want to open a file seach dialog from within my python script which I run from within PythonWin. I also have the wxPython package installed. How might I do this? Thanks,
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.