1.常用调用方法 public partial class UCRights : UserControl { private readonly int LOCATIONY; private DataTable MENU = new DataTable(); private BLL.User oUser = new HRPOWER.BLL.User(); public UCRights() { InitializeComponent(); LOCATIONY = panRightMenu_Top.
方法一: Var I: Integer; Begin For I := To ComponentCount - Do //获取组件数量 Begin If Components[I] Is TWinControl Then Begin If (Components[I] As TWinControl).Focused Then Begin Self.Caption := (Components[I] As TWinControl).Name; Break; End; End; End; 方法二: