unit Main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, DBClient, MConnect, SConnect, Buttons, ExtCtrls, DBCtrls,
Grids, DBGrids, StdCtrls, StrUtils, Menus, ActnList, XPStyleActnCtrls,
ActnMan, AppEvnts, ComCtrls, StatusBarEx, ObjBrkr, XPMenu, UnlimitedMenu,
DBClientActns, DBActns, ImgList, ToolWin, ActnCtrls;
type
TMainForm = class(TForm)
MainMenu1: TMainMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
N8: TMenuItem;
N9: TMenuItem;
StatusBarEx1: TStatusBarEx;
A6011: TMenuItem;
N10: TMenuItem;
N11: TMenuItem;
N12: TMenuItem;
N13: TMenuItem;
N14: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
N17: TMenuItem;
N18: TMenuItem;
ImageList1: TImageList;
amFunction: TActionManager;
A101: TAction;
A102: TAction;
dsMain: TDataSource;
A103: TAction;
A111: TAction;
A112: TAction;
A121: TAction;
A122: TAction;
A123: TAction;
N19: TMenuItem;
N20: TMenuItem;
A201: TAction;
A202: TAction;
A203: TAction;
A204: TAction;
A205: TAction;
A206: TAction;
A401: TAction;
A402: TAction;
A403: TAction;
A404: TAction;
A405: TAction;
A407: TAction;
A408: TAction;
A409: TAction;
A410: TAction;
A411: TAction;
A412: TAction;
A413: TAction;
A414: TAction;
A415: TAction;
A406: TAction;
A801: TAction;
A802: TAction;
A803: TAction;
A804: TAction;
N21: TMenuItem;
N22: TMenuItem;
N23: TMenuItem;
N24: TMenuItem;
N25: TMenuItem;
N26: TMenuItem;
N27: TMenuItem;
N28: TMenuItem;
N29: TMenuItem;
N30: TMenuItem;
N31: TMenuItem;
N32: TMenuItem;
N33: TMenuItem;
N34: TMenuItem;
N35: TMenuItem;
N36: TMenuItem;
N37: TMenuItem;
N38: TMenuItem;
N39: TMenuItem;
N40: TMenuItem;
N41: TMenuItem;
N42: TMenuItem;
N43: TMenuItem;
N44: TMenuItem;
N45: TMenuItem;
N46: TMenuItem;
N47: TMenuItem;
N48: TMenuItem;
N49: TMenuItem;
A905: TAction;
A906: TAction;
A907: TAction;
A908: TAction;
A909: TAction;
A910: TAction;
A911: TAction;
N50: TMenuItem;
N51: TMenuItem;
N52: TMenuItem;
N53: TMenuItem;
N54: TMenuItem;
N55: TMenuItem;
N56: TMenuItem;
XPStyle: TXPMenu;
procedure A101Execute(Sender: TObject);
private
Procedure atForm(iFormid:Integer) ;
{ Private declarations }
public
{ Public declarations }
end;
var
MainForm: TMainForm;
implementation
uses Employee, Organise, DMSystems;
{$R *.dfm}
procedure TMainForm.atForm(iFormid: Integer);
begin
case iFormid of
101
MSystem.Form.Locate('FormId',iFormid,[oPartialKey])
102: ;
end;
//其中DMSystem.Form.FieldByName('FormName').AsString就是窗体名,我怎么样用下面的函数实现创建出来?
Application.CreateForm()
end;
procedure TMainForm.A101Execute(Sender: TObject);
begin
atForm(StrToInt(Copy(TAction(Sender).Name,2,3))) ;
end;
end.