简单的问题请大家帮忙帮忙看看 var tempform:tform;这个声名是不行的。type tempform = class(TForm)这样看看可不可以。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 try tempform:=aboutform.create(self);//或addform; tempform.showmodal; finally tempform.free;=============tryfinally它是执行完的,你已把tempform.free掉了 tempform?不用它可以嗎?如果可以的話,不用就行了 try tempform:=aboutform.create(self);//或addform; tempform.showmodal; finally tempform.free;少了一个T应该为:try tempform:=Taboutform.create(self);//或addform; tempform.showmodal; finally tempform.free; Q1:搂上已经给出答案了。另外还存在一种情况,就是你的aboutform本身在程序启动的时候已经创建,因此你使用Taboutform.create(self);是无法创建它的,要判断窗体是否已经被创建,你可以看一下dpr文件中是否已经存在Application.createform(aboutform.Taboutform);一句。Q2:以下两句的区别只在于当窗体创建的时候其父类是什么,一般的如果窗体是动态创建的,可以直接使用self创建。tempform:=aboutform.create(self);tempform:=aboutform.create(Application);Q3:那一句是对应你的try...finally语句的,因为你使用的是finally,意味着try部分执行完毕之后必须执行free这个操作,但如果窗体是无法正常创建的,那么free的操作就会变成非法操作,所以有这样的warning了。我建议最好用except取代finally。然后利用窗体的modalresult去关闭窗体。 delphi xe2 64位嵌入汇编问题??? 请问如何在dbgrid里边获取选定的行的行号? 各位老大:使用delphi如何实现COM组件的连接点 年龄很大的一个菜鸟想学delphi该从那几本书开始 一个messagebox问题! 用Delphi 7 编写Web数据库操作的问题。 为什么必须引用单元1? 低手:“提问!” 高手:“回答!” 怎样饶过BDE访问本地数据库?INTERBASE数据库一定要启动INTERBASE? 请问哪能找到串口支持大于16的ActiveX控件? 求救:有关DLL的使用!请进! 一个奇怪的问题!帮帮我
tempform:=aboutform.create(self);//或addform;
tempform.showmodal;
finally
tempform.free;
=============try
finally
它是执行完的,你已把tempform.free掉了
tempform:=aboutform.create(self);//或addform;
tempform.showmodal;
finally
tempform.free;
少了一个T
应该为:try
tempform:=Taboutform.create(self);//或addform;
tempform.showmodal;
finally
tempform.free;
Application.createform(aboutform.Taboutform);一句。
Q2:以下两句的区别只在于当窗体创建的时候其父类是什么,一般的如果窗体是动态创建的,可以直接使用self创建。
tempform:=aboutform.create(self);
tempform:=aboutform.create(Application);
Q3:那一句是对应你的try...finally语句的,因为你使用的是finally,意味着try部分执行完毕之后必须执行free这个操作,但如果窗体是无法正常创建的,那么free的操作就会变成非法操作,所以有这样的warning了。我建议最好用except取代finally。然后利用窗体的modalresult去关闭窗体。