|
欢迎您注册加入!这里有您将更精采!
您需要 登录 才可以下载或查看,没有账号?注册
x
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, StdCtrls;
type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
E1: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
V1: TMenuItem;
N8: TMenuItem;
F1: TMenuItem;
H1: TMenuItem;
OpenDialog1: TOpenDialog;
SaveDialog1: TSaveDialog;
FontDialog1: TFontDialog;
Memo1: TMemo;
Y1: TMenuItem;
D1: TMenuItem;
procedure N2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure N4Click(Sender: TObject);
procedure N5Click(Sender: TObject);
procedure N6Click(Sender: TObject);
procedure N7Click(Sender: TObject);
procedure V1Click(Sender: TObject);
procedure D1Click(Sender: TObject);
procedure F1Click(Sender: TObject);
procedure Y1Click(Sender: TObject);
procedure Memo1Change(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.N2Click(Sender: TObject);
begin
memo1.Lines.Clear; //清空MEO1里的东西达到新建效果
end;
procedure TForm1.N3Click(Sender: TObject);
begin
if OpenDialog1.Execute then
memo1.lines.loadfromfile(OpenDialog1.filename); //这句话意思是打开OpenDialog1控键的名字给MEMO1这个显示控键来判断
end;
procedure TForm1.N4Click(Sender: TObject);
begin
if SaveDialog1.Execute then
memo1.Lines.SaveToFile(SaveDialog1.FileName); //这句话的意思是,调用 (SaveDialog1控件 来让MEMO这个孔键来 SaveToFile 这个英语应该就是保存的意思
end;
procedure TForm1.N5Click(Sender: TObject);
begin
close; //这个简单 就是关闭的意思
end;
procedure TForm1.N6Click(Sender: TObject);
begin
memo1.copytoclipboard; //这句是复制
end;
procedure TForm1.N7Click(Sender: TObject);
begin
memo1.CutToClipboard //这句是剪切
end;
procedure TForm1.V1Click(Sender: TObject);
begin
memo1.pastefromclipboard; // 这句是粘贴
end;
procedure TForm1.D1Click(Sender: TObject);
begin
Memo1.ClearSelection; // 这句是删除
end;
procedure TForm1.F1Click(Sender: TObject);
begin
if FontDialog1.Execute then
memo1.Font:=FontDialog1.Font; //调用FontDialog1这个控键
end;
procedure TForm1.Y1Click(Sender: TObject);
begin
showmessage('第二课笔记') //这个是弹出对话框做注释用的
end;
procedure TForm1.Memo1Change(Sender: TObject);
begin
end;
end. |
|