Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Common Dialog - set default view to thumbnail...

Posted on 2002-07-12
1
Medium Priority
?
670 Views
Last Modified: 2008-03-17
Here's my code and everything works fine except I can't seem to find a way to set the default view to thumbnail on a commondialog call.  I've found a few API examples but don't have the luxury of using an api call since it is instanciated with vbscript object tag and called with javascript...

<object id="cdlg" classid="clsid:F9043C85-F6F2-101A-A3C9-08002B2F49FB" width="32" height="32" VIEWASTEXT>
    <param name="FileName" value="*.*">
    <param name="Filter" value="Pictures(*.bmp;*.gif;*.jpg)|*.bmp;*.gif;*.jpg|All files|*.*">
</object>

<SCRIPT language="javascript">
function selectFile(imgCtrl)
{          
   var initialDir = "[somepath]";
   cdlg.InitDir = initialDir;
         
   cdlg.showopen();
   var file=cdlg.filename;
   ctrlNm = imgCtrl.id;
   document.all(ctrlNm).src = file;
}
   
</SCRIPT>

DOES ANYONE KNOW OF THE PROPERTY OR HOW TO ACCESS THE METHOD/PROPERTY TO SET THE VIEW TO THUMBNAIL INSTEAD OF LISTVIEW for a common dialog etc.?
0
Comment
Question by:funke
1 Comment
 
LVL 10

Accepted Solution

by:
zvonko earned 800 total points
ID: 7150852
Hello funke,

I do not think that this property exists.

This I do for two reasons:
1.) Compatibility to systems not displaying Thumbnail Icons (WinNT)
2.) Every directory can have own setting to List or Icons

You can force all directories to have same setting in Explorer, but when not general set and this control is active then you can go trough several directories with different list options.

Look yourself for available properties here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cmdlg98/dt_vbctlCommonDialogControlOpenSaveAsDialog_P.asp

Good luck,
zvonko

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

926 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