在该Button的OnClick事件中写代码:
Form2.show;
或者在工程启动时不创建Form2,同样在Button的OnClick事件中写代码:
Form2 := TForm2.Create(self);
Form2.show;
这样更好。
Form2.show;
或者在工程启动时不创建Form2,同样在Button的OnClick事件中写代码:
Form2 := TForm2.Create(self);
Form2.show;
这样更好。
解决方案 »
- fastreport4.9怎样预览时跟设计时有的位置差远了
- 如何判断frame是否已经创建?
- 100分求delphi6 带的visibroker详细资料,我只找到for c++/java 的program guide
- 如何读取数据源是dbf的文件
- 奇怪,期待高手解答
- 急死我了,谢谢,来帮个忙
- 快来帮忙
- 字符串结尾是以什么来标识的?
- 我想通过取sql server的中文纪录,然后用WebBrowser打开,却总是出现乱码,请问如何解决啊,郁闷好几天了!!!!
- 如何写任务栏运行的程序?
- 请问将char转为string,该怎么转换?
- 怎么会出现could not create output file C:\my documents\project1.exe谢谢
1.Form1作为主窗口
2.Button的OnClick事件:Form2.show;(或showmodal)
或:工程外创建
if not asssign(Form2) then
begin
Form2 := TForm2.Create(self);
Form2.show;
end else Form2.Free;
1.Form1作为主窗口
2.Button的OnClick事件:Form2.show;(或showmodal)
或:工程外创建
if not asssign(Form2) then
begin
Form2 := TForm2.Create(TForm2, Form2);
Try
Form2.showModal;
Finally
Form2.free;
Form2:=NIL;
end;
end else Form2.show;