Unit19.pas
上传用户:szyozho
上传日期:2013-04-13
资源大小:3688k
文件大小:3k
- unit Unit19;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, Menus, StdCtrls;
- type
- Tmadeanswerform = class(TForm)
- Memo1: TMemo;
- MainMenu1: TMainMenu;
- N3: TMenuItem;
- N26: TMenuItem;
- N5: TMenuItem;
- N19: TMenuItem;
- N6: TMenuItem;
- N21: TMenuItem;
- FontDialog1: TFontDialog;
- N1: TMenuItem;
- N4: TMenuItem;
- N7: TMenuItem;
- N8: TMenuItem;
- N9: TMenuItem;
- N10: TMenuItem;
- procedure N19Click(Sender: TObject);
- procedure N24Click(Sender: TObject);
- procedure N26Click(Sender: TObject);
- procedure N2Click(Sender: TObject);
- procedure N4Click(Sender: TObject);
- procedure N7Click(Sender: TObject);
- procedure N8Click(Sender: TObject);
- procedure N9Click(Sender: TObject);
- procedure N10Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- madeanswerform: Tmadeanswerform;
- fname:string;
- implementation
- uses printers;
- {$R *.dfm}
- procedure Tmadeanswerform.N19Click(Sender: TObject);
- begin
- if fontdialog1.Execute then
- begin
- memo1.Font:=fontdialog1.Font;
- end;
- end;
- procedure Tmadeanswerform.N24Click(Sender: TObject);
- //var
- //filename:string;
- begin
- //savedialog1.Title:='保存生成后的试卷';
- //savedialog1.FileName:=fname;
- //if savedialog1.Execute then
- // begin
- // filename:=savedialog1.FileName;
- // memo1.Lines.SaveToFile(filename+'.doc');
- // end;
- end;
- procedure Tmadeanswerform.N26Click(Sender: TObject);
- begin
- close;
- end;
- procedure Tmadeanswerform.N2Click(Sender: TObject);
- //var lines :integer;
- // prntext:system.text;
- begin
- Screen.Cursor:=crHourGlass;
- try
- print;
- ShowMessage('打印完毕');
- finally
- Screen.Cursor:=crDefault;
- end;
- {
- if printdialog1.Execute then
- assignprn(prntext);
- rewrite(prntext);
- printer.canvas.Font:=memo1.font;
- for lines:=0 to memo1.Lines.Count-1 do
- begin
- writeln(prntext,memo1.lines[lines]);
- system.Close(prntext);
- end; }
- end;
- procedure Tmadeanswerform.N4Click(Sender: TObject);
- begin
- memo1.Undo;
- end;
- procedure Tmadeanswerform.N7Click(Sender: TObject);
- begin
- memo1.CutToClipboard;
- end;
- procedure Tmadeanswerform.N8Click(Sender: TObject);
- begin
- memo1.CopyToClipboard;
- end;
- procedure Tmadeanswerform.N9Click(Sender: TObject);
- begin
- Memo1.PasteFromClipboard;
- end;
- procedure Tmadeanswerform.N10Click(Sender: TObject);
- begin
- memo1.SelectAll;
- madeanswerform.N8.Enabled:=true;
- madeanswerform.N9.Enabled:=true;
- end;
- end.