Solved

Common Dialog - set default view to thumbnail...

Posted on 2002-07-12
1
660 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 200 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

706 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

20 Experts available now in Live!

Get 1:1 Help Now