|
RE: Controlling 'type' of Windows Explorer Thanks for the information, dean-dean and Ronnie.
Based on what you explained, I downloaded Visual Basic Express 2005 to write
a visual basic program to display the contents of a search-ms file (which I
arbitrarily called 'saved') -- turned out to be a one-line program:
MsgBox(My.Computer.FileSystem.ReadAllText("C:\Users\Baffin\Photos\saved.search-ms")
which displayed the text file below, containing information in XML format.
We can see how column information is stored persistently in the XML to
implement the column features described by dean-dean and Ronnie.
I would have thought Explorer would display a folder (or search-ms result)
using one a of set of 'templates' that would include the usual 'Music',
'Photos', etc and in addition have a 'User-defined', in which case Explorer
would use specific column selections/settings defined for that folder/search.
If a folder/search had no defined template (eg., at first access), Explorer
would guess, based on file type. If the guess was wrong, the user would
override the guess (forcing a particular template, eg ., Photos) or pick
'user-defined' which would allow picking of specific columns for that
particular folder/search. (And/or Explorer could try to 'inherit' as an
initial guess the template of the searched folders, which would be classy.)
It's reasonable for a user to expect the results of a search on Music, for
example, to be displayed by Explorer just as it would display the real
folders that were the subject of the search.
But apparently at this point Explorer can only display search-ms results as
'user-defined' on a column basis and ignores content type or templates.
Interestingly, the VB object OpenFileDialog sees saved searches as folders
(excellent!) and allows selection of a file from within a saved search
(excellent!), but the FolderBrowserDialog doesn't see saved searches as
folders (disappointing). Maybe there is a VB switch or property to get
FolderBrowerDialog to see saved searches as folders?
If FolderBrowerDialog would recognize saved searches as folders (ie.,
'virtual folders'), a lot of power would have been delivered to the user for
'free' -- for example, the Random Photos screen saver provided by MS, which
can now select from a folder tree specified by the user, would have been able
to work immediately upon a set of photos defined by a user-provided saved
search (presuming the Photos screensaver uses FolderBrowserDialog). I wonder
why FolderBrowserDialog wasn't made to work with search-ms, especially since
OpenFileDialog seems to. Not doing it makes saved searches much less
interesting/useful.
Aside: Is there an easy way to display and edit *.search-ms files as XLM
from Explorer? (especially since Explorer's search interface doesn't display
searches with more than one phrase, for example, the one below, which was
defined using Explorer's search pane but cannot be fully displayed or thus
edited with that same pane -- a shocking deficiency!)
Aside: I'm surprised MS decided to give so much emphasis to folder type,
when so many people may prefer to have type on a file basis (with folders
containing mixed types, ie., files organized by criteria other than type,
eg., project or time).
Ronnie, thanks for the photobucket tip -- I'd prefer if MS would implement
something that supports cut-and-paste of screen capture images (surely
something basic for a communities discussing UI), as recently implemented in
Windows Live Mail, but I'll keep your method in mind until then for future
postings.
FYI, here's the contents of a search-ms file:
<?xml version="1.0"?>
<persistedQuery version="1.0"><viewInfo viewMode="details" iconSize="16"
stackIconSize="0" displayName="Search Results in Photos"
autoListFlags="0"><visibleColumns><column
viewField="System.ItemNameDisplay"/><column
viewField="System.DateModified"/><column viewField="System.ItemType"/><column
viewField="System.ItemFolderPathDisplayNarrow"/><column
viewField="System.Author"/><column
viewField="System.Keywords"/></visibleColumns><sortList><sort
viewField="System.ItemNameDisplay"
direction="ascending"/></sortList></viewInfo><query><conditions><condition
type="andCondition"><attributes/><condition type="leafCondition"
property="System.ItemFolderPathDisplay" propertyType="string"
operator="contains" value="\baffin\photos"
valuetype="System.StructuredQueryType.String"><attributes/></condition><condition
type="leafCondition" property="System.Kind" propertyType="string"
operator="word eq" value="picture"
valuetype="System.StructuredQueryType.String"><attributes/></condition><condition
type="notCondition"><attributes/><condition type="leafCondition"
property="System.ItemFolderNameDisplay" propertyType="string"
operator="wordmatch" value="panoramas"
valuetype="System.StructuredQueryType.String"><attributes/></condition></condition></condition></conditions><kindList><kind
name="item"/></kindList><providers><provider
clsid="{88CF4A86-5D7A-48EB-B53E-EA388A390096}"/></providers><scope><include
path="C:\Users\Baffin\Photos"/></scope></query><properties><author
Type="string">Baffin</author></properties></persistedQuery> |