1.
放在private的上面,或声明在pulished下面.可以这样访问form的成员
如:form1.button1.
声明变量:
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;type
TForm1 = class(TForm)
Button1: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;var
//在这里声明
Form1: TForm1;implementation{$R *.DFM}end.
放在private的上面,或声明在pulished下面.可以这样访问form的成员
如:form1.button1.
声明变量:
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;type
TForm1 = class(TForm)
Button1: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;var
//在这里声明
Form1: TForm1;implementation{$R *.DFM}end.
解决方案 »
- case和with两个有什么区别最好能写两个通俗易懂的例子谢谢。
- 有个VB的代码想转DELPHI,但不懂VB,高手请进,100分回送~!
- 郁闷啊 dxComponentPrinter的打印问题?
- 关于在TStringGrid类的对象中删除行(列),插入行(列)的问题。
- delphi的前途?
- 关于异地数据库的模型
- 一个头痛问题。
- 帮我
- 我是否该form.close?(急)
- 老是出现project xxx.exe raised exception classEDatabaseError with message'missing connection or connectionstring'.....,
- 我有QQ了,高兴送分
- 如何在创建表之前先检测一下,如果存在????
"在form2中调用Application.MessageBox"
你是不是点击form2中的一个按钮来调用Application.MessageBox的?如果是就把这个按钮的modalresult属性设成mrnone.
2.你程序的毛病,无意间设置了哪个属性请重新做一个
1。请问怎样将Form中的成员声明成全局成员,如我每次用
Public
/*这里是定义公用函数或者过程的
xxxxx:Txxxxxx //如 Treeview等
DELPHI都告诉我错误,好象是说Txxxxxx不是完整的类型
2。我在Form1中以模式窗体显示form2,再在form2中用了Application.MessageBox显示了一个对话框,但当我点对话框中的确定时便返回到form1,即form2被关闭了,我想在点了确定后,依然回到form2,请问应该怎么做?
/*不是按钮關閉,这个对话框是不会关闭form2的
2、改用API MessageBox
var
...的形式。
2。触发对话框的按钮的modalresult属性设成mrnone.