今天刚用delphi,向各位请教下RT的问题。
就是我创建对话框的时候,如何同时也能传个值进去?
------------------------------------------
比如CB里面有个
int Index(0);
TfrmTest *dlg = new TfrmTest(this,Index);
dlg->ShowModal();
然后在TfrmTest的构造函数中将Index的值拿过来用就行
-------------------------------------------
那么Delphi中怎么搞呢?谢谢大家了
就是我创建对话框的时候,如何同时也能传个值进去?
------------------------------------------
比如CB里面有个
int Index(0);
TfrmTest *dlg = new TfrmTest(this,Index);
dlg->ShowModal();
然后在TfrmTest的构造函数中将Index的值拿过来用就行
-------------------------------------------
那么Delphi中怎么搞呢?谢谢大家了
解决方案 »
- RAVE 报表组件
- Delphi出现这样的情况是怎么了?
- 我想取鼠标所在点的rgb值,color:=getpixel(getwindowdc(getdesktopwindow),mousepos.x,mousepos.y);
- 结束主程序中各类子线程
- fastreport如何支持jpeg及控件的安装
- 初学delphi,qreport问题,报表中的数据通过adoquery查询参数得到。如参数为5个用户id,每一个id应对应一张报表,当报表预览时,如何单击n
- 会打印的大侠请帮忙看看!!!!!!!!!!!!!
- 如何编辑Listview的caption?
- 很简单,拷贝,粘贴的Delphi代码是什么?
- 简单SQL,免费送分!
- 求助,如何把IE里看到的数值发送到memo?
- 在WIN7下安装XE2怎么老是不成功?
Form1 := TForm1.Create(self);//Self这里就是个参数啦!!嘿嘿。
然后可以通过Self.Owner.Tag取值。方法多多。
Form1: TForm1;implementationuses Unit2;{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
Form2 := TForm2.Create(Application,100);
Form2.ShowModal;
end;type
TForm2 = class(TForm)
private
{ Private declarations }
public
constructor create(AOwner:TComponent;index:Integer);reintroduce;
end;var
Form2: TForm2;implementation{$R *.dfm}{ TForm2 }constructor TForm2.create(AOwner: TComponent; index: Integer);
begin
inherited Create(AOwner);
ShowMessage(IntToStr(index));
end;end.