Browse by Tags
All Tags » WebBrowser » Using Controls (RSS)
Sorry, but there are no more tags available to filter with.
-
|
The WebBrowser can be used as a file browser by giving it a URL of a folder on the file system. For an example of this see WebBrowserSamples.
|
-
|
The WebBrowser can be used to host an Office document, Flash animation, or PDF file by giving it the URL of the file. For an example of this see WebBrowserSamples.
|
-
|
The WebBrowser can be used to view an XML file by giving it the Url of the file. For an example of this see WebBrowserSamples.
|
-
|
For an example of this, see http://msdn2.microsoft.com/en-us/library/system.windows.forms.webbrowser.objectforscripting
|
-
|
You can access, and write to, the HTML behind a web page being displayed by the WebBrowser using the WebBrowser.DocumentText property. For an example of this see WebBrowserSamples.
|
-
|
You can access, and write to, the HTML behind a web page being displayed by the WebBrowser using the WebBrowser.DocumentText property. For an example of this see WebBrowserSamples.
|
-
|
You can build a tabbed browser by combining a TabControl with multiple WebBrowser controls. For a simple example of this see WebBrowserSamples.
|
-
|
The WebBrowser control is a resource-intensive control. Be sure to call the Dispose method when you are finished using the control to ensure that all resources are released in a timely fashion. You must call the Dispose method on the same thread that...
|
-
|
The WebBrowser control is primarily a managed wrapper of the WebBrowser ActiveX object. There are four main unmanaged interfaces that are wrapped in one form or another: IWebBrowser2 The core WebBrowser interface. DWebBrowserEvents2 The...
|
-
|
Note: It is recommended that during development you put try catch blocks around the contents of all WebBrowser methods. Since the core of the managed WebBrowser is an unmanaged ActiveX control, it captures all exceptions thrown in its methods before they...
|
-
|
In VS 2005, the form is no longer COM-Visible by default. This prevents it from being set as the object for scripting. To allow scripting to target the form, do the following: In VS select "Project" from the main menu Select "<YourAppName>...
|
-
|
The most likely reason that you are not getting a particular event from the WebBrowser is that that event is hidden. Since the WebBrowser is an ActiveX control it differs in the standard events that it raises.
|
-
|
You can access, and write to, the HTML behind a web page being displayed by the WebBrowser using the WebBrowser.DocumentText property. For an example of this see WebBrowserSamples.
|
-
|
Sometimes e.MaximumProgress returns a value of 0. If you are trying to control a ProgressBar by dividing e.CurrentProgress by e.MaximumProgress, or by setting a ProgressBar's Maximum to e.MaximumProgress, you will get a divide by zero exception. To...
|
-
|
The simplest approach to accomplish this is to save the html file and the associated images to a temp directory, and navigate the WebBrowser to that html file.
|
-
|
If a web page is not displaying a language correctly, be sure that the web page: Uses correctly formed HTML Contains the Content-type metatag: < META http-equiv="Content-Type" content="text/html; charset =ENC-JP"> Where ENC-JP...
|
-
|
The webBrowser.Url is not a string, but rather is a Uri object . If you still want to use a string to set the WebBrowser.Url you can do so in one of following ways: webBrowser.Url = new Uri("path string"); webBrowser.Navigate("path string"...
|
-
|
A possible reason that the WebBrowser's Url value changes when navigating to a site is due to a redirect that would cause the Url to change from its original value.
|
-
|
Set auto complete source of the TextBox or ComboBox being used for the address to "All Url's" or to "custom". See WebBrowserSamples for an example.
|
-
|
Currently there is no workaround to avoid the click noise when clicking on a link.
|
-
|
The WebBrowser control does not work in partial trust. This class makes security demands at the class level, therefore a SecurityException is thrown when a derived class or any caller in the call stack does not have full trust permission. For details...
|
-
|
To get the Url that the WebBrowser is navigating to in a new window, use DWebBrowserEvents2::NewWindow3. This method is not exposed by IntelliSense. For information on how to use it, see: http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=7228 for...
|
-
|
To navigate to an addresses that contains escaped characters (such as %20) be sure to use the webBrowser.Navigate(String) method instead of the webBrowser.Navigate(Uri) method. The Uri method escapes these characters by default, while the String method...
|
-
|
To block pop-ups, use the following registry key: HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER) SOFTWARE Microsoft Internet Explorer Main FeatureControl FEATURE_WEBOC_POPUPMANAGEMENT For more information on this topic, see http://msdn.microsoft.com/library...
|
-
|
Be sure that AllowNavigation is set to true. This property not only prevents users from making the WebBrowser navigate, but also prevents the WebBrowser from programmatically being given a new Url.
|
-
|
For an example of this, see http://msdn2.microsoft.com/en-us/library/system.windows.forms.webbrowser.objectforscripting
|
-
|
To control XP SP2 security features, you can set various registry keys. For detailed information, see: http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2brows.mspx
|
-
|
For information on how to disable JavaScript, and adjusting WebBrowser permissions in general see the white paper on "Adjusting WebBrowser Permissions With InternetSecurityManager" up on MSDN.
|
-
|
Take a look at Tim Anderson's The HtmlEditor - a C# control that wraps MSHTML for a sample control that wraps MSHTML. Contributed from George Shepherd's Windows Forms FAQ
|
-
|
Look at the following articles to clear the Cache. How to clear the cache when your application hosts a WebBrowser control in Visual Basic .NET (Article ID: 311289) HOW TO: Clear the Cache When Your Application Hosts a WebBrowser Control in Visual C#...
|
-
|
There is a known bug: BUG: The BeforeNavigate2 Event of the WebBrowser Control Does Not Fire If Hosted in a Visual Basic .NET Application (Article ID: 311298) BUG: The BeforeNavigate2 Event of WebBrowser Control Does Not Fire If Hosted in a Visual C#...
|
-
|
You can set the content editable by getting a reference to a IHTMLElement3 element and initializing the contentEditable property with "true". private void EnableEditing() { IHTMLDocument3 doc = (IHTMLDocument3) browser.GetDocument(); if (doc...
|
-
|
We have two suggestions with sample projects how you host a WebBrowser control inside a form and display HTML contents and listen to events such as NavigateComplete or BeforeNavigate. Of course there are many other ways to do this. Download htmlviewer...
|
-
|
I use a WebBrowser control in a Windows Forms control. When this control is used in an EXE, it works fine. But when I embed this control in a IE web page, the WebBrowser in it doesn't work (could not show any web page). Why can't the WebBrowser...
|