Windows 7 - UserAccounts.CommonDialog alternative for Vista?

Asked By arno on 20-Oct-07 03:33 PM
I sell an application that supports vbscript in it's forms, and on
some I use UserAccounts.CommonDialog to display a File Open dialog so
a user can select a filename.

On Vista, this functionality is not available. My question: is there
an alternative for Vista that does not require distributing any
additional controls?

Some background info:
My searches so far revealed that the following alternatives are
available, none of them are very appealing

-Using MSComDlg.CommonDialog, which requires installing the Common
Dialog control, which  is subject to licensing

-Using SAFRCFileDlg.FileSave, which also requires installing an
additional control, and which is deprecated and not originally
intended for use in scripting in the first place.

-Using Choose File HTML File Control Object, a workaround that
(ab)uses IE, that I find inventive but very ugly..

tia,
arno




Paul Randall replied on 20-Oct-07 08:21 PM
Hi, Arno

MSComDlg.CommonDialog is indeed a licensed control, which Microsoft
distributes with Visual Studio and perhaps some other packages.  Microsoft
also gives you a free license with some of its free downloads, one of which
is a simple HTML editor.  Perhaps you can read the license agreement when
you install one of these free downloads and figure out a similar way for
your users to get the free license.  The first time you run the HTML editor
.HTA on a computer with no license for MSComDlg.CommonDialog, it installs
the license.  Perhaps your application can use the common dialog's other
functions, such as its color picker.

Learn about this simple HTML editor at:
http://msdn2.microsoft.com/en-us/library/ms537834.aspx;

Download it at:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/samples/internet/author/html/htmleditor/default.asp

Search the .HTA for this line to see how to set up the control:

-Paul Randall
mayayana replied on 20-Oct-07 10:49 PM
There's a free control here:

http://www.jsware.net/jsware/scripts.php3#brows

You can probably also find other free controls.
Other than that (3rd party) I don't think you'll
find anything built-in that's always available.

You don't mention what your program is that you
sell. You say it "supports scripts". Does that mean it's
a compiled EXE? If so, why not use the system API?
That's in comdlg32.dll, which is installed universally.
The comdlg OCX control is just a wrapper for the
API function, which is not hard to use.
arno replied on 21-Oct-07 05:10 PM
Thanks both of you for your replies. I have several options for other
free controls, but I would only use them as a last resort - my
experience is that admins or users themselves always forget to install
them.


As long as I would know that there is something on Vista that is
always there, I would be saved. The dialog on other OSes are already
dealt with via my script.


Yes, I am only a reseller, i do not have access to the source.

arno