|
我想在窗体A中,单击“button1"按扭后,显示窗体B。但老是出错,如图:
窗体A的代码:
unit MainForm;
interface
uses
Business.System, Business.Model, Business.Forms;
type
TMainForm = class(TForm)
FuncBroker: TFuncBroker;
InfoBrokerJHDDXX: TInfoBroker;
ControlBar: TControlBar;
DataNavigator: TDataNavigator;
Panel: TPanel;
DocViewJHDDXX_JHDD: TDocView;
Edit1: TEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{private declarations}
public
{public declarations}
end;
implementation
var
FM: TGHDWCT;
procedure TMainForm.Button1Click(Sender: TObject);
begin
FM := TGHDWCT.Create(Self.Context);
try
Dialogs.ShowMessage(FM.Caption);
finally
FM.Free;
end;
end;
end.
窗体B的代码:
unit GHDWCT;
interface
uses
Business.System, Business.Model, Business.Forms, Business.Data;
type
TGHDWCT = class(TForm)
FuncBroker: TFuncBroker;
InfoBrokerGHDWXX: TInfoBroker;
ControlBar: TControlBar;
DataNavigator: TDataNavigator;
Panel: TPanel;
DocViewGHDWXX_GHDW: TDocView;
DataGrid1: TDataGrid;
DataSetBroker1: TDataSetBroker;
private
{private declarations}
public
{public declarations}
end;
implementation
end.
|
-
-
3.jpg
10.62 KB, 下载次数: 149
|