本文整理自网络,侵删。
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;
相关阅读 >>
python4Delphi 示例应用程序在 Delphi 应用程序中运行简单的 python 脚本
Delphi string.create(char,count)
Delphi indy 组件包里的 idhttp 组件使用 get 方法下载文件限速的方法
Delphi 获取随机字符串的方法 getrandomstring
更多相关阅读请进入《Delphi》频道 >>