如何将一TWincontrol控件像TForm一样show出来?而不需要指定它的parent
试着copy部分TForm中的CreateParams方法代码。。。没试成功。。。
[解决办法]
有意思,为什么要这样子弄呢。。可不可以参考Application.MessageBox的代码。。
[解决办法]
如果想研究,最好看一下Windows编程。
因为这是基本知识,CreateParams中把WS_CHILD去掉。
http://blog.csdn.net/linzhengqun
[解决办法]
看看 frame 的 CreateParams 过程
procedure TCustomFrame.CreateParams(var Params: TCreateParams);
begin
inherited;
if Parent = nil then
Params.WndParent := Application.Handle;
end;
[解决办法]
parent是一定要指定的,不过有些时候指定的是desktop