Mega Code Archive

 
Categories / Delphi / LAN Web TCP
 

How to Reset the TWebBrowser Delphi control to an Empty (Blank) Page

Title: How to Reset the TWebBrowser Delphi control to an Empty (Blank) Page The TWebBrowser Delphi component allows displaying HTML and web *aware* documents inside your application. To navigate to a document from code use the Navigate method. Let's say you have a TWebBrowser component, named "webBrowser1", on a form. To navigate to the About Delphi Programming site main page you can use the next code line: webBrowser1.Navigate('http://delphi.about.com') ; If, for whatever the reason is, you have to clear the web browser window, "reset" it, and display an empty page, you need to navigate to a "blank" page. Here's how do "reset" the TWebBrowser to display a blank, empty page: webBrowser1.Navigate('about:blank') ;