unit1.pas

来自「简单的学生管理系统」· PAS 代码 · 共 64 行

PAS
64
字号
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, ToolWin, Menus, ImgList, ActnList;

type
  Tmainform = class(TForm)
    MainMenu1: TMainMenu;
    ActionList1: TActionList;
    ImageList1: TImageList;
    S1: TMenuItem;
    F1: TMenuItem;
    H1: TMenuItem;
    editstudentAction: TAction;
    findstudentAction: TAction;
    printstudentAction: TAction;
    manageuserAction: TAction;
    aboutAction: TAction;
    exitAction: TAction;
    ToolBar1: TToolBar;
    ToolButton1: TToolButton;
    ToolButton2: TToolButton;
    ToolButton3: TToolButton;
    ToolButton4: TToolButton;
    ToolButton5: TToolButton;
    ToolButton6: TToolButton;
    ToolButton7: TToolButton;
    ToolButton8: TToolButton;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure exitActionExecute(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  mainform: Tmainform;

implementation

{$R *.dfm}

procedure Tmainform.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  if messagedlg('您真的想退出学生管理信息系统吗?',mtconfirmation,[mbyes,mbno],0)=mryes then
    begin
    action:=cafree;
    end
  else
  action:=canone;
  
end;

procedure Tmainform.exitActionExecute(Sender: TObject);
begin
   close;
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?