运用delphi编写记事本

时间:2012-03-16 15:05:49
【文件属性】:

文件名称:运用delphi编写记事本

文件大小:172KB

文件格式:RAR

更新时间:2012-03-16 15:05:49

记事本 delphi

运用delphi设计记事本 代码: unit jsb; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, StdCtrls; type TForm1 = class(TForm) MainMenu1: TMainMenu; F1: TMenuItem; fw1: TMenuItem; V1: TMenuItem; H1: TMenuItem; N1: TMenuItem; O1: TMenuItem; S1: TMenuItem; N2: TMenuItem; N3: TMenuItem; Q1: TMenuItem; H2: TMenuItem; N4: TMenuItem; A1: TMenuItem; N8: TMenuItem; N9: TMenuItem; F2: TMenuItem; E1: TMenuItem; U1: TMenuItem; N5: TMenuItem; T1: TMenuItem; C1: TMenuItem; P1: TMenuItem; N6: TMenuItem; F3: TMenuItem; F4: TMenuItem; N7: TMenuItem; A2: TMenuItem; L1: TMenuItem; N10: TMenuItem; N11: TMenuItem; D1: TMenuItem; U2: TMenuItem; N12: TMenuItem; OpenDialog1: TOpenDialog; SaveDialog1: TSaveDialog; FontDialog1: TFontDialog; Memo1: TMemo; procedure T1Click(Sender: TObject); procedure C1Click(Sender: TObject); procedure P1Click(Sender: TObject); procedure Q1Click(Sender: TObject); procedure O1Click(Sender: TObject); procedure N1Click(Sender: TObject); procedure S1Click(Sender: TObject); procedure F2Click(Sender: TObject); procedure L1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.T1Click(Sender: TObject); begin form1.memo1.cuttoclipboard; end; procedure TForm1.C1Click(Sender: TObject); begin form1.memo1.copytoclipboard; end; procedure TForm1.P1Click(Sender: TObject); begin form1.memo1.pastefromclipboard; end; procedure TForm1.Q1Click(Sender: TObject); begin close; end; procedure TForm1.O1Click(Sender: TObject); begin form1.OpenDialog1.execute; form1.memo1.lines.loadfromfile(form1.OpenDialog1.filename); end; procedure TForm1.N1Click(Sender: TObject); begin form1.memo1.lines.clear; end; procedure TForm1.S1Click(Sender: TObject); begin form1.saveDialog1.execute; form1.memo1.lines.savetofile(form1.saveDialog1.filename); end; procedure TForm1.F2Click(Sender: TObject); begin fontdialog1.Execute; memo1.font:=fontdialog1.Font; end; procedure TForm1.L1Click(Sender: TObject); begin form1.memo1.clearselection; end; end.


【文件预览】:
记事本
----jsb.~pas(2KB)
----Project3.dpr(184B)
----Project3.dof(2KB)
----jsb.~ddp(51B)
----jsb.dfm(4KB)
----Project3.cfg(434B)
----jsb.~dfm(4KB)
----jsb.ddp(51B)
----Project3.res(876B)
----jsb.pas(2KB)
----jsb.dcu(6KB)
----Project3.exe(384KB)

网友评论

  • 可以使用,可以供我这中初学者作为参考 但情况考虑的不是很全面 比如保存 以及另存为 还有退出时的保存提醒功能
  • 好,但是不规范。。。值得鼓励嘉奖
  • delphi7实现,编码是自己编写的,功能基本都实现,但是存在一些Bug,快捷键的设置也不规范啊,呵呵。