各位大虾帮个忙,我最近学习写个软件,突然想起个问题不知怎样实现,还请各位大虾指点下
例如:
在Form1中放Panel1控件,新建Form2
然后怎样在编译后,运行时Form2就在Panel1中。谢谢
例如:
在Form1中放Panel1控件,新建Form2
然后怎样在编译后,运行时Form2就在Panel1中。谢谢
解决方案 »
- 各位高手进,打包问题,烦。。。
- 合同签了,可是试用期三金不给缴,如何办?
- delphi变量?
- 高分请教一个简单的问题!
- 关于QQ中探测对方地址热烈讨论,大家请进
- 在DELPHI中,如何用ADO调用数据库?
- r1.2G精选控件共享给大家,希望你能找到你想要的.速度绝没有问题.不过只为大家开一晚上.
- 使用TClientDataSet时,如何在当前记录处插入一条新记录?
- 大侠!大侠!请问多个不同的表查询在一个DBGrid里显示,应怎样设置?各
- 为什么我在Delphi中用Pascal下的read,write会提示错误?而在VC中用C下的scanf,printf输入,输出语句VC就会弹出DOS窗口???
- 解密
- 请各位大虾帮一下,看看俺应该咋办?
ChildForm.BorderStyle := bsNone;
ChildForm.SetBounds(0, 0, ParentControl.Width, ParentControl.Height); Windows.SetParent(ChildForm.Handle, ParentControl.Handle);
ChildForm.Visible := True;
var
aForm2: TForm2;
begin
aForm2 := TForm2.Create(self);
Form2.Parent := Panel1;
Form2.Left := 0;
Form2.Top := 0;
Form2.Visible := true;
end楼上的方法也可以,嘿嘿
Windows.SetParent(ChildForm.Handle, ParentControl.Handle); //ChildForm 为FORM2
//ParentControl 为 Panel1