本文整理自网络,侵删。
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几个进制相关的代码(hextoint、hextoasc)
Delphi toscilloscope 仿windows任务管理器cpu使用记录组件
Delphi 判断是否为空('none', 'null', '')
Delphi enumwindows回调函数获取qq2009窗体句柄
更多相关阅读请进入《Delphi》频道 >>