oracle基础知识讲义
源代码在线查看: unit1.pas
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
procedure SysCommand(var Msg: TMessage); message wm_SysCommand;
public
{ Public declarations }
procedure About;
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
var
SysMenu: hMenu;
begin
SysMenu := GetSystemMenu(Handle, False);
ModifyMenu(SysMenu, sc_Close, mf_ByCommand, sc_Close, '模拟关闭窗体功能(&C)'#9'Alt+F4');
DeleteMenu(SysMenu, 0, mf_ByPosition);
AppendMenu(SysMenu, mf_Separator, 0, #0);
AppendMenu(SysMenu, mf_ByCommand, 666, '关于(&A)...');
end;
procedure TForm1.SysCommand(var Msg: TMessage);
begin
inherited;
if Msg.wParam = 666 then About;
end;
procedure TForm1.About;
begin
MessageDlg('您点击了About菜单项!', mtInformation,[mbOk], 0);
end;
end.