SHDocVw questions

G

Guest

I want to use SHdocVw to navigate the local file system. This is not a
problem as something like he following will achieve my purpose....

AxWebBrowser1.Navigate("C:\")

My problem is that I wish to display the folders and files in "Windows
Classic" view on an XP machine without the common task pane. How is this done?

Also, how can I ovverride the context menus when a user clicks on a file or
folder?
 
J

Jeffrey Tan[MSFT]

Hi Mike,

Based on my understanding, you want to get a detail control on WebBrowser
when navigating to a file system folder.

First, when we use webbrowser to navigate normal html page, we may get a
detail control over it through Html DOM. But while browsing file system,
webbrowser control actually uses windows' shell process to view and
manipulate that directory. There is no HTML DOM here, not DOM interface to
give us the control. All the views and context menus are queried through
Explorer shell.

So for your issue, I have 2 options:
1. Intercept the right mouse down in the application form level, just
display a customized context menu for the entire webbrowser surface.
2. Add menu items to the certain directory's context menu, this need
implement some shell extension interface, such as IContextMenu, for details
information about how to write shell extension in C#, please refer to below
article:
"Manage With the Windows Shell: Write Shell Extensions with C#"
http://www.theserverside.net/articles/showarticle.tss?id=ShellExtensions

Note: this operation is system wide, that is when you view that directory
in windows explorer, the context menu is also changed.

For your another requirement of displaying all files in "Windows Classic"
view, can you explain this in details for me? Do you mean change the entire
system's theme from XP to windows classic.(Note: if so, there is no
directory way to get this done, this is system wide setting)
========================================================
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top