Programming Delphi How to reset the WebBrowser control to a blank page in delphi

Still, the Navigate method is used to complete this task. Create a new project, add a TWebBrowser and a TButton component to your form. Assign the following codes in the proper places.

procedure TForm1.FormCreate(Sender: TObject) ;
begin
   WebBrowser1.Navigate('http://codeback.com');
end;

procedure TForm1.Button1Click(Sender: TObject) ;
begin
   WebBrowser1.Navigate('about:blank');
end;

In fact, the navigate method is very important a method in TWebBrowser component.

 


Add comment


Security code
Refresh

Programming - Delphi