这个事件是写在基类中,在所有窗体中show时自动调用进行判断的,是一个权限的控制过程。
procedure TForm1.JsSetQx(FormName: Array of string;QxValue: Array of Boolean);
var
  Ii,PI,IntLen:Integer;
  KjName:string;
begin intLen := Length(FormName);if intLen > 0 then
begin
  for PI := 0 to intLen - PI do
  begin
       if QxFormName[PI]=Self.Name then  //判断是否有参数form       for Ii := 0 to self.ComponentCount -1 do
       begin
          KjName:=TBitBtn(self.Components[Ii]).Name ;          if self.Components[Ii] is TBitBtn then //如果是bitBtn控件,并名为BtnSave,则设为参数变量值
          if 'btnSave'=KjName then TBitBtn(self.Components[Ii]).Enabled:=QxValue;       end;
  end;
end;end;我想放在Show事件中这样使用:JsSetQx(':FormUser,:FormLog',[False,True]);