popupmenu1.autohotkeys:=mamanual; file://自定义热键
while not eof do
begin file://根据出版社内容生成菜单子项
popupitem:=tmenuitem.create(self);
popupitem.caption:=fieldbyname(''publisher'').asstring;
popupmenu1.items.add(popupitem);
popupitem.onclick:=popup1handler; file://确定菜单子项的点击事件
next;
end; end;
popupmenu1.popup(384,67); file://在指定位置显示快捷菜单1
end;
**********************************************************************
procedure tmainform.formactivate(sender: tobject);
begin file://系统初始化,在进入mainform时自动添加数据源
mainform.dbgrid1.datasource:=datamoduleform.mainsource;
mainform.dbnavigator1.datasource:=datamoduleform.mainsource;
mainform.dbgrid2.datasource:=datamoduleform.empsource;
mainform.dbnavigator2.datasource:=datamoduleform.empsource;
mainform.dbgrid3.datasource:=datamoduleform.shopsource;
mainform.dbnavigator3.datasource:=datamoduleform.shopsource;
mainform.dbgrid4.datasource:=datamoduleform.insource;
mainform.dbnavigator4.datasource:=datamoduleform.insource;
mainform.dbgrid5.datasource:=datamoduleform.outsource;
mainform.dbnavigator5.datasource:=datamoduleform.outsource;
end;
**********************************************************************
procedure tmainform.formcreate(sender: tobject);
<< 上一页 [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] ... 下一页 >>