增加项到系统菜单

  • A+
所属分类:[开发技巧]

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Buttons;

type
  TForm1 = class(TForm)
    BitBtn1: TBitBtn;
    procedure FormCreate(Sender: TObject);
  private
    procedure WMSysCommand(VAR Message: TWMSysCommand); message WM_SYSCOMMAND;
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation
 

uses Unit2;

{$R *.DFM}

procedure TForm1.WMSysCommand(var Message: TWMSysCommand);
begin
  Inherited;
  IF Message.CmdType = $F200  THEN form2.showmodal
end;

procedure TForm1.FormCreate(Sender: TObject);
var s : string;
begin
  s := '&Copyright...';
  AppendMenu(GetSystemMenu(Handle, False), MF_STRING, $F200, PChar(s));
end;

end.
 

200810101453336024.rar

历史上的今天
十月
10
  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的微信公众号
  • 我的微信公众号扫一扫
  • weinxin
广告也精彩
avatar
广告也精彩

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: