Unit22.pas
上传用户:szyozho
上传日期:2013-04-13
资源大小:3688k
文件大小:2k
源码类别:

教育系统应用

开发平台:

Delphi

  1. unit Unit22;
  2. interface
  3. uses
  4.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  5.   Dialogs, Menus, StdCtrls;
  6. type
  7.   Tautoanswerform = class(TForm)
  8.     Memo1: TMemo;
  9.     MainMenu1: TMainMenu;
  10.     N3: TMenuItem;
  11.     N26: TMenuItem;
  12.     N5: TMenuItem;
  13.     N19: TMenuItem;
  14.     N6: TMenuItem;
  15.     N21: TMenuItem;
  16.     FontDialog1: TFontDialog;
  17.     N1: TMenuItem;
  18.     N4: TMenuItem;
  19.     N7: TMenuItem;
  20.     N8: TMenuItem;
  21.     N9: TMenuItem;
  22.     N10: TMenuItem;
  23.     procedure N19Click(Sender: TObject);
  24.     procedure N2Click(Sender: TObject);
  25.     procedure N26Click(Sender: TObject);
  26.     procedure N4Click(Sender: TObject);
  27.     procedure N7Click(Sender: TObject);
  28.     procedure N8Click(Sender: TObject);
  29.     procedure N10Click(Sender: TObject);
  30.     procedure N9Click(Sender: TObject);
  31.   private
  32.     { Private declarations }
  33.   public
  34.     { Public declarations }
  35.   end;
  36. var
  37.   autoanswerform: Tautoanswerform;
  38. implementation
  39. {$R *.dfm}
  40. procedure Tautoanswerform.N19Click(Sender: TObject);
  41. begin
  42. if fontdialog1.Execute then
  43. begin
  44. memo1.Font:=fontdialog1.Font;
  45. end;
  46. end;
  47. procedure Tautoanswerform.N2Click(Sender: TObject);
  48. begin
  49. Screen.Cursor:=crHourGlass;
  50.   try
  51.     print;
  52.     ShowMessage('打印完毕');
  53.   finally
  54.     Screen.Cursor:=crDefault;
  55.   end;
  56. end;
  57. procedure Tautoanswerform.N26Click(Sender: TObject);
  58. begin
  59. close;
  60. end;
  61. procedure Tautoanswerform.N4Click(Sender: TObject);
  62. begin
  63. memo1.Undo;
  64. end;
  65. procedure Tautoanswerform.N7Click(Sender: TObject);
  66. begin
  67. memo1.CutToClipboard;
  68. end;
  69. procedure Tautoanswerform.N8Click(Sender: TObject);
  70. begin
  71. memo1.CopyToClipboard;
  72. end;
  73. procedure Tautoanswerform.N10Click(Sender: TObject);
  74. begin
  75. memo1.SelectAll;
  76. autoanswerform.N8.Enabled:=true;
  77. autoanswerform.N9.Enabled:=true;
  78. end;
  79. procedure Tautoanswerform.N9Click(Sender: TObject);
  80. begin
  81. Memo1.PasteFromClipboard;
  82. end;
  83. end.