473,320 Members | 2,158 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,320 software developers and data experts.

WebBrowser Control Puzzle - Setting Folder View

2
Hello all,

I have an application I have written in VB that utilizes the web browser control. Users can access webpages with it but also scan folders on their computer. Here is my question that I have yet to see anybody resolve (even though others have asked the exact same thing in other forums):


How do I automatically set the folder view to "View Details" if the user navigates to a folder on their computer instead of an html address?

I would like to do this as simply as possible (codewise) from within the webbrowser.

By right-clicking, I can access the context menu and manually change it to "View"-->"Details" but is there a way to do this programmatically within VB?
Thanks!


P.S., I would like to do this without requiring the user to change any of their IE explorer settings (or Windows folder view settings).
Dec 19 '07 #1
1 2221
float
2
Here is an easy to make example that demonstrates my issue.

On a new windows form:

1.) Place a button, textbox, and WebBrowser control.

2.) Use the following code for form 1:



Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

WebBrowser1.Navigate(TextBox1.Text)

End Sub

End Class



3.) Run the program

4.) Type a drive (for example, c:\) or folder path (c:\documents and settings) into the textbox and press the button

5.) Depending on the folder or path you typed in, the folder view you see in the WebBrowser is not always “details” view. However, you can right-click on the WebBrowser and select “View”à “Details” to see the folders in detailed view.

It is driving me crazy that I cannot figure out how to get VB to always display the contents in “Details” view even though that option is available on the right-click context menu while the app is running. Anybody have any thoughts?
Dec 19 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Al Sav | last post by:
Hi, I am trying to use webbrowser control in an application. I use the control to browse computer, in other words using it as an embedded windows explorer. I am trying to write my own File...
9
by: ASP .NET Newbie | last post by:
How can I run a WebBrowser control using ASP.NET/VB.NET? I know I can use the WebClient to get the page data, but I need to be able to use the WebBrowser (AxWebBrowser)? Thanks, Chad
2
by: Lee | last post by:
Hi, I am using the WebBrowser control included with VS2005 to view XML files, and they are being displayed correctly as far as I can tell. The problem I am having is saving these XML files to...
0
by: Anthony England | last post by:
Is anyone happily using the MS WebBrowser control to browse files and folders on an Access form? My database allows for the creation of a customer folder where a variety of files can be stored. ...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
2
by: Zytan | last post by:
I have a WebBroswer control, and I set the HTML it will display via DocumentText, which takes a a string. This shows the HTML code from the string in the control. But, sometimes, the WebBrowser...
3
by: =?Utf-8?B?R2F1cmF2?= | last post by:
I am using the AxSHDocVw.AxWebBrowser control (named PreviewBrowser) in my C# app to load a pdf file: PreviewBrowser.Navigate(strPDF ,ref objNull,ref objNull,ref objNull,ref objNull); These PDF...
2
by: Scott Gravenhorst | last post by:
I recently (within 30 days) downloaded and installed VB 2005 Express. I like it a whole lot... but: I have been trying to work with the WebBrowser control to display a small amount of help text...
0
by: supriya51902003 | last post by:
Hi All, Can any one help me regarding this problem-- I have a windows form with a webbrowser control. I want to drag a file from my PC and drop on Webbrowser control. The Webbrowser will...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.