Solved

Common Dialog - set default view to thumbnail...

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Tools for analysis of code 4 50
Wordpress and Wufoo 1 39
Worldmap 1 28
Given a github repo find email address of all collaborators in that repo 1 36
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…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

726 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