Home > Back-end >  The use of TWebBrowser problem
The use of TWebBrowser problem

Time:10-21

Environment: DELPHI7
IE6 IE8 ie 9
Problem description:
In WebBrowser1 add custom HTML language, and then found the problem after the link address record,
The same program
In XP with IE6, text value is: about: blankTFXXXXXXXXXXX
In Internet explorer 8, 9 in xp, the text value is: about: TFXXXXXXXXXXX
Both differ: blank

How can appear the following situation?



 

Procedure TForm1. WebBrowser1StatusTextChange (Sender: TObject;
Const Text: WideString);
The begin
Memo2. Lines. The Add (text);
end;

Procedure TForm1. Button4Click (Sender: TObject);
The begin
WebBrowser1. Navigate (' the about: blank);
Sethtml (WebBrowser1, memo1. Text)
end;

Procedure TForm1. Sethtml (const WebBrowser: TWebBrowser;
Const Html: string);
Var
Document1: IHtmlDocument2;
V: oleVariant;
The begin
Document1:=WebBrowser. Document as IHtmlDocument2;
If (Assigned (Document1)) then the begin
V:=VarArrayCreate ([0, 0], varVariant);
V [0] :=Html;
//Document1. Writeln (PSafeArray (TVarData (v) varrays));
Document1. Writeln (PSafeArray (TVarData (v) varrays));
Document1. Close;
end;
end;

CodePudding user response:

CodePudding user response:

A: why didn't men
  • Related