本文整理自网络,侵删。
delphi添加任务栏右键菜单
procedure TForm1.FormCreate(Sender: TObject);
var
Mnu:HMenu;
begin
Mnu:=GetSystemMenu(Application.Handle, False);
AppendMenu(Mnu,MF_SEPARATOR,0,nil);
AppendMenu(Mnu,MF_STRING,WM_ABOUT,pchar('关于我们..^^'));
Application.OnMessage:=OnAppMessage;
end;
procedure TForm1.OnAppMessage(var Msg : TMsg ; Var Handled : Boolean);
begin
if Msg.message=WM_SYSCOMMAND then begin
if Msg.wParam=WM_ABOUT then begin
form2.Show;
end;
end;
end;
相关阅读 >>
Delphi的initialization和finalization
关于idtcpserver和idtcpclient对stream的发送与接收问题
Delphi xe6、xe5、xe7在android创建快捷方式
更多相关阅读请进入《Delphi》频道 >>