By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,795 Members | 1,251 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,795 IT Pros & Developers. It's quick & easy.

Change to Classic Folders view from ActiveX control

P: n/a
I am using the WebBrowser control (Explorer.Shell.2) from within a VBA
application, embedded on an MS Access form to display the contents of a
local folder. By default on Windows 2000/XP the control displays the
"Common Tasks" section on the left-hand side of the display - I assume it
just shows/hides this based upon the Windows user's settings. Is there any
way to change this to "Classic View", ie to remove the left-side "Common
Tasks" display?

As a part of the WebBrowser's automation object (ShellFolderView), I can see
there is an enumeration called "ViewOptions", and of this enumeration's
constants is named SFVVO_WIN95CLASSIC, but this is just a read-only
property.

I've looked at various API calls and interfaces to try to do this, but I
can't find anything suitable. I know that I could achieve similar
functionality by implementing something with the standard ListView, but this
would take far too long for what I want to do. The WebBrowser control works
fine and has a low memory footprint considering it actually is
Internet/Windows Explorer, but I just want to hide the left-side pane.

I am open to any suggestions!

Thanks,
Tony Meier
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I don't know about the API for that but if you're
hosting the folder window you should have access
to the DOM of the folder.htt. In WinXP folder.htt is locked
in a DLL but you should be able to read it by retrieving
the source of the document in the WB window.

Example: In the Win98 folder.htt the left side is a
<DIV> with ID of "Panel" and the listview has an
ID of "FileList". There are style settings in
the page head, including:

#Panel {position: absolute; width: 30%; height: 100%; overflow: auto}
#FileList {position: absolute; left: 30%; width: 70%; height: 100%}

So it seems that you ought to be able to use DHTML after
the folder/page loads to resize the "Panel" DIV to width of 0
and/or change its visibility. Maybe something like:
WB.Document.parentWindow.Panel.Style.width = 0
WB.Document.parentWindow.FileList.Style.width = 100%

(WB.Document.Script.window also gets you the document
parent window. I don't know what the official method is. )

--
--
Tony Meier <tm****@gmail.com> wrote in message
news:cl*******************@news.demon.co.uk...
I am using the WebBrowser control (Explorer.Shell.2) from within a VBA
application, embedded on an MS Access form to display the contents of a
local folder. By default on Windows 2000/XP the control displays the
"Common Tasks" section on the left-hand side of the display - I assume it
just shows/hides this based upon the Windows user's settings. Is there any way to change this to "Classic View", ie to remove the left-side "Common
Tasks" display?

As a part of the WebBrowser's automation object (ShellFolderView), I can see there is an enumeration called "ViewOptions", and of this enumeration's
constants is named SFVVO_WIN95CLASSIC, but this is just a read-only
property.

I've looked at various API calls and interfaces to try to do this, but I
can't find anything suitable. I know that I could achieve similar
functionality by implementing something with the standard ListView, but this would take far too long for what I want to do. The WebBrowser control works fine and has a low memory footprint considering it actually is
Internet/Windows Explorer, but I just want to hide the left-side pane.

I am open to any suggestions!

Thanks,
Tony Meier

Nov 13 '05 #2

P: n/a
Thanks for the idea mayayana. I am currently testing out this approach and
I will post back here later today and give a solution if I ever find it!

Regards,
Tony

"mayayana" <ma**********@mindYYspring.com> wrote in message
news:4y*****************@newsread3.news.atl.earthl ink.net...
I don't know about the API for that but if you're
hosting the folder window you should have access
to the DOM of the folder.htt. In WinXP folder.htt is locked
in a DLL but you should be able to read it by retrieving
the source of the document in the WB window.

Example: In the Win98 folder.htt the left side is a
<DIV> with ID of "Panel" and the listview has an
ID of "FileList". There are style settings in
the page head, including:

#Panel {position: absolute; width: 30%; height: 100%; overflow: auto}
#FileList {position: absolute; left: 30%; width: 70%; height: 100%}

So it seems that you ought to be able to use DHTML after
the folder/page loads to resize the "Panel" DIV to width of 0
and/or change its visibility. Maybe something like:
WB.Document.parentWindow.Panel.Style.width = 0
WB.Document.parentWindow.FileList.Style.width = 100%

(WB.Document.Script.window also gets you the document
parent window. I don't know what the official method is. )

--
--
Tony Meier <tm****@gmail.com> wrote in message
news:cl*******************@news.demon.co.uk...
I am using the WebBrowser control (Explorer.Shell.2) from within a VBA
application, embedded on an MS Access form to display the contents of a
local folder. By default on Windows 2000/XP the control displays the
"Common Tasks" section on the left-hand side of the display - I assume it
just shows/hides this based upon the Windows user's settings. Is there

any
way to change this to "Classic View", ie to remove the left-side "Common
Tasks" display?

As a part of the WebBrowser's automation object (ShellFolderView), I can

see
there is an enumeration called "ViewOptions", and of this enumeration's
constants is named SFVVO_WIN95CLASSIC, but this is just a read-only
property.

I've looked at various API calls and interfaces to try to do this, but I
can't find anything suitable. I know that I could achieve similar
functionality by implementing something with the standard ListView, but

this
would take far too long for what I want to do. The WebBrowser control

works
fine and has a low memory footprint considering it actually is
Internet/Windows Explorer, but I just want to hide the left-side pane.

I am open to any suggestions!

Thanks,
Tony Meier


Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.