Solved

Common Dialog - set default view to thumbnail...

Posted on 2002-07-12
1
667 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
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…
Suggested Courses

615 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