...Paste, Undo, Redo and SelectAll in TWebBrowser?

Author: Dev4u.ch
Homepage: http://www.dev4u.ch

Category: Internet / LAN

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.

// as of Internet Explorer 4
// ab Internet Explorer 4

 

printed from
www.swissdelphicenter.ch
developers knowledge base