473,322 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Change to Classic Folders view from ActiveX control

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
2 3723
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Karuppasamy | last post by:
Hi I want to populate all the files and folders of System in a Treeview control like Windows Explorer. I try this using File System Objects. But sometimes I am getting an error like 'Access...
2
by: Fie Fie Niles | last post by:
This one XP machine (with IE 6) is having a problem viewing any ActiveX controls (created on VB6) on the Internet Explorer browser. I put the same ActiveX control in a VB program, and when I run...
3
by: Web Webon | last post by:
Hi everybody! I wonder if this is possible? I need to determine if a client is using "windows classic folders" or anything else. If I instantiate a Shell ActiveX object is there a way of...
1
by: Norman Fritag | last post by:
Hi there I have avoided to use active x controls because I thought they are causing more problems then they are doing any good. I a new application I would want to use the tree and list view...
3
by: ACaunter | last post by:
Hi all, Does anyone know how to view DICOM images (.dcm) in a picturebox/imagebox in asp.net. dicom are medical images which cannot be altered, but you should still be able to view them, maybe by...
3
by: Brian Henry | last post by:
How would you go about doing this I have a tree view which where anything is a parent it is a folder (folder icon, and the tag for the object is a string that says "FOLDER:{name of folder...
9
by: Charles Law | last post by:
Hi chaps I realise that this is a .NET group, but please don't shoot me down quite yet. I looked in the vb classic groups and there seems to be so little activity there that I was not hopeful of...
2
by: Phaiz | last post by:
Not sure if you'd need an activex control but I'm looking for a script to change the folder view to "Classic View" within IE. I have an iframe that loads the users My Documents folder and would...
1
by: =?Utf-8?B?UHJhZGVlcCBFYXJsYQ==?= | last post by:
Hi I am having one windows application on my local machine and I want to display the folders(shared folders) of remote machine in tree view control of my win application. I haved added me as...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.