delphi 动态创建MainMenu 事件
onClick:=abc;Procedureabc(Sender:Tobject);beginwithSenderasTmenuItemdobeginifcaption=...
onClick:=abc;
Procedure abc(Sender:Tobject);
begin
with Sender as TmenuItem do
begin
if caption='a' then
with a_F.Create(nil) do
try
ShowModal;
finally
Free;
end;
if caption='b' then
with b_F.Create(nil) do
try
ShowModal;
finally
Free;
end;
end;
end;
以上事件有错么?怎么点了都没反映 展开
Procedure abc(Sender:Tobject);
begin
with Sender as TmenuItem do
begin
if caption='a' then
with a_F.Create(nil) do
try
ShowModal;
finally
Free;
end;
if caption='b' then
with b_F.Create(nil) do
try
ShowModal;
finally
Free;
end;
end;
end;
以上事件有错么?怎么点了都没反映 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询