创建启动画面时出错了(20分)

W

wgzhou

Unregistered / Unconfirmed
GUEST, unregistred user!
begin
Application.Initialize;
try
begin
flash_form:=Tflash_form.create(application);
flash_form.show;//请稍候:正在连接数据库
flash_form.update;
Application.CreateForm(TnokasytData, nokasytData);
flash_form.panel1.caption:='请稍候:正在启动';
Application.CreateForm(TForm1, Form1);
end;
finally
flash_form.close;
end;
Application.Run;
end.

出现:[Error] nokasyt.dpr(62): '.' expected but ':=' found的错误,
请教各位是错在哪里
当我去掉显示画面时,没错
 
flash_form:=Tflash_form.create(application);
改为application.createform(Tflash_form,flash_form)
 
//你的程序需要改动,按以下格式改一下

//创建flash窗口
frm_splash:=TFrm_Splash.create(application);
frm_splash.show;
frm_splash.update;
//初始化程序
Application.Initialize;
Application.Title := '生管系统';
//创建主窗体
Application.CreateForm(Tfrm_main, frm_main);
//释放flash窗体
frm_splash.hide;
frm_splash.free;
Application.Run;
 
>>flash_form:=Tflash_form.create(application);
>>改为application.createform(Tflash_form,flash_form)
如果那样改,那就真的错了。[:)]
不能那样改的,那样会讲Flash_Form作为主窗体建立,然后Close掉,那么程序就退出了。
但出看他的代码没问题,估计应该是别的问题吧。
另外62行是那一行?
 
第62行是:
flash_form:=Tflash_form.create(application);
 
你在輸入這條語句有否注意全角與半角。flash_form:=Tflash_form.create(application);
 
unit flash_form;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls;
type
Tflash = class(TForm)
Panel1: TPanel;
private
{ Private declarations }
public
{ Public declarations }
end;

var
flash: Tflash;
implementation
{$R *.DFM}
end.
 
to:你在輸入這條語句有否注意全角與半角。flash_form:=Tflash_form.create(application);
我是在英文状态下输入的
如果是全角,系统会提示是非法字符
 
把try段落中的begin
...end去掉,没什么必要嘛。
不过估计不是这个原因
 
将工程中Flash_Form改为Flash即可;
即如:Flash:=TFlash。Creat(Application);
因为你的Flash_Form。Pas对应的窗体的Name为Flash,
而不是Flash_Form;
 
改為:
begin
Application.Initialize;
try
begin
flash:=Tflash.create(application);
flash.show;//请稍候:正在连接数据库
flash.update;
Application.CreateForm(TnokasytData, nokasytData);
flash.panel1.caption:='请稍候:正在启动';
Application.CreateForm(TForm1, Form1);
end;
finally
flash.close;
end;
Application.Run;
end.
 
多人接受答案了。
 

Similar threads

顶部