I
itluo
Unregistered / Unconfirmed
GUEST, unregistred user!
程序代码如下:
unit cjTotal_printUt;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, QRCtrls, QuickRpt, ExtCtrls;
type
TcjTotal_printF = class(TForm)
.
.
private
{ Private declarations }
public
{ Public declarations }
end;
var
cjTotal_printF: TcjTotal_printF;
procedure show_cjTotal_printF(Aowner: Tcomponent);
implementation
uses data_pubUt,pubUt;
{$R *.dfm}
//单元接口(建立窗体)
procedure show_cjTotal_printF(Aowner: Tcomponent);
begin
with TcjTotal_printF.Create(Aowner) do
try
showmodal;
finally
free;
end;
end;
在另一窗体的SpeedButton1Click的click事件中如下调用
procedure Tdate_tjF.SpeedButton1Click(Sender: TObject);
begin
show_cjTotal_printF(self);
end;
在2000以上运行,能正常调用(建立窗体),但在98上调用却出现非法操作!
我错在哪里?(在project->options 里 cjTotal_printF 设为非自动建立)
unit cjTotal_printUt;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, QRCtrls, QuickRpt, ExtCtrls;
type
TcjTotal_printF = class(TForm)
.
.
private
{ Private declarations }
public
{ Public declarations }
end;
var
cjTotal_printF: TcjTotal_printF;
procedure show_cjTotal_printF(Aowner: Tcomponent);
implementation
uses data_pubUt,pubUt;
{$R *.dfm}
//单元接口(建立窗体)
procedure show_cjTotal_printF(Aowner: Tcomponent);
begin
with TcjTotal_printF.Create(Aowner) do
try
showmodal;
finally
free;
end;
end;
在另一窗体的SpeedButton1Click的click事件中如下调用
procedure Tdate_tjF.SpeedButton1Click(Sender: TObject);
begin
show_cjTotal_printF(self);
end;
在2000以上运行,能正常调用(建立窗体),但在98上调用却出现非法操作!
我错在哪里?(在project->options 里 cjTotal_printF 设为非自动建立)