用Delphi编写一个简单的记事本,另存为,撤销,全选的代码怎么写
用Delphi编写一个简单的记事本,另存为,撤销,全选的代码怎么写
另存为代码:
begin
with savedialog1 do
if execute then
begin
richedit1.Lines.SaveToFile (filename);
form1.Caption := '记事本|'+filename;
opendialog1.FileName := filename;
end;
end;
全选:
richedit1.SelectAll;
撤消:
richedit1.Perform(EM_UNDO,0,0);