H
hoyaxun
Unregistered / Unconfirmed
GUEST, unregistred user!
MainMenu1: TMainMenu;
System: TMenuItem;
Login: TMenuItem;
ZhuXiao: TMenuItem;
N21: TMenuItem;
ChangePasswd: TMenuItem;
UseManager: TMenuItem;
N25: TMenuItem;
ShuoDingpm: TMenuItem;
OperateLog: TMenuItem;
N9: TMenuItem;
ClearDade: TMenuItem;
exit: TMenuItem;
View: TMenuItem;
Append: TMenuItem;
procedure EnabledMenu(menuname:string);//获得用户可操作的菜单
var mycomponent:Tcomponent;
begin
if (Mainf.FindComponent(menuname)<>nil) then
begin
showmessage(menuname);///这一句可以显示
if (Mainf.FindComponent(menuname) is TMenuItem) then
begin
showmessage('ok1');//这一句没有显示,为什么会这样啊,前面我明明定义的是TMenuItem的啊,这个过程把'System'放其中也不会显示这一名,请指教
(Mainf.FindComponent(menuname) as TMenuItem).Enabled:=true;
end;
System: TMenuItem;
Login: TMenuItem;
ZhuXiao: TMenuItem;
N21: TMenuItem;
ChangePasswd: TMenuItem;
UseManager: TMenuItem;
N25: TMenuItem;
ShuoDingpm: TMenuItem;
OperateLog: TMenuItem;
N9: TMenuItem;
ClearDade: TMenuItem;
exit: TMenuItem;
View: TMenuItem;
Append: TMenuItem;
procedure EnabledMenu(menuname:string);//获得用户可操作的菜单
var mycomponent:Tcomponent;
begin
if (Mainf.FindComponent(menuname)<>nil) then
begin
showmessage(menuname);///这一句可以显示
if (Mainf.FindComponent(menuname) is TMenuItem) then
begin
showmessage('ok1');//这一句没有显示,为什么会这样啊,前面我明明定义的是TMenuItem的啊,这个过程把'System'放其中也不会显示这一名,请指教
(Mainf.FindComponent(menuname) as TMenuItem).Enabled:=true;
end;