Delphi Programming

  1. Home
  2. Computing & Technology
  3. Delphi Programming

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

By Zarko Gajic, About.com

"Clear" WebBrowser window

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') ;

Delphi tips navigator:
» Enumerating and Playing System Sounds from Delphi code
« How to Filter Files and Folders Displayed by the TShellTreeView

More Delphi Programming Quick Tips
Zarko Gajic
Guide since 1998

Zarko Gajic
Delphi Programming Guide

Explore Delphi Programming

More from About.com

Delphi Programming

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Using VCL Components
  5. TWebBrowser
  6. How to Reset the TWebBrowser Delphi control to an Empty (Blank) Page

©2008 About.com, a part of The New York Times Company.

All rights reserved.