Mega Code Archive

 
Categories / Delphi / Graphic
 

Setget the background color of a page in TWebbrowser

Title: set/get the background color of a page in TWebbrowser? //You need a TWebbrowser and 3 TButtons //Du brauchst einen TWebbrowser und 3 TButtons // First load a page // Zuerst eine Seite laden procedure TForm1.Button1Click(Sender: TObject); begin WebBrowser1.Navigate('www.SwissDelphiCenter.com'); end; // Show the background color // Hintergrundfarbe herausfinden procedure TForm1.Button2Click(Sender: TObject); begin ShowMessage(WebBrowser1.OleObject.Document.bgColor); end; // Set the background color // Hintergrundfarbe setzen procedure TForm1.Button3Click(Sender: TObject); begin WebBrowser1.OleObject.Document.bgColor := '#000000'; end;