首页  编辑  

Paste, Undo, Redo and SelectAll in TWebBrowser

Tags: /超级猛料/OS.操作系统/IE.扩展/TWebBrowser/操作/   Date Created:

Paste, Undo, Redo and SelectAll in TWebBrowser

uses

 ActiveX;

// Paste the text from the clipboard

// Den  Text aus der Zwischenablage einf ügen

procedure TForm1.Button1Click(Sender: TObject);

begin

 try

   WebBrowser1.ExecWB(OLECMDID_PASTE, OLECMDEXECOPT_PROMPTUSER);

 except

 end;

end;

// Undo

// Rückgängig

procedure TForm1.Button2Click(Sender: TObject);

begin

 try

   WebBrowser1.ExecWB(OLECMDID_UNDO, OLECMDEXECOPT_PROMPTUSER);

 except

 end;

end;

// Redo

// Wiederholen

procedure TForm1.Button3Click(Sender: TObject);

begin

 try

   WebBrowser1.ExecWB(OLECMDID_REDO, OLECMDEXECOPT_PROMPTUSER);

 except

 end;

end;

// Select all

// Alles auswählen

procedure TForm1.Button4Click(Sender: TObject);

begin

 try

   WebBrowser1.ExecWB(OLECMDID_SELECTALL, OLECMDEXECOPT_PROMPTUSER);

 except

 end;

end;

initialization

 OleInitialize(nil);

finalization

 OleUninitialize;

end.