473,804 Members | 3,123 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WebBrowser Control Puzzle - Setting Folder View

2 New Member
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 programmaticall y 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 2239
float
2 New Member
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(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Click

WebBrowser1.Nav igate(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
1164
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 Manager, with some custom features. I had read, I can use doverb and execwb methods of the control to make it do things. I am trying to control the folder view of the explorer control, like changing it to small icons, large icons. I am unable to find...
9
3814
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
2349
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 disk. If I try to save the contents of the WebBrowser.DocumentText to disk, the resulting file contains HTML and script that I don't want. Is there any way I can save the actual XML document to disk from the WebBrowser control?
0
1337
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. These could be quotes, letters, photos etc but they are all stored in this one folder and need to be displayed on the customer form. Having considered a number of alternatives (from writing my own code and using only native Access controls...
0
5578
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 ******************************************************** For this teeny job, please refer to: http://feeds.reddit.com/feed/8fu/?o=25
2
11153
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 shows nothing. Clicking 'view source' shows: "<HTML></HTML>", and the filename is called "about_blank.txt", which is the about:blank URL. I am aware that when you set this property, the WebBrowser control automatically navigates to the...
3
3175
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 files are created and stored in a temp folder. The older files from temp need to be deleted everytime prior to calling the Navigate function for the current file. But I am getting an exception when i try to delete the temp folder
2
6364
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 for my application and though I've finally made it work, it seems a bit quirky, so perhaps that's the control being quirky or perhaps there is something I don't understand. 1) I could not figure out a way to make the webbrowser object display a...
0
1667
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 identify this file drop event,file type and will save this file to specific directory in server. For example image file will go to image folder, document file will do to Doc folder like that. If any one have such solution please let me know. My...
0
9708
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9587
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7623
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3827
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.