我现在使用UpdateLayeredWindow后,png图片做的窗体显示出来了,可form上的子控件却看不见了,不过依然存在,而且也响应相应的事件,我现在想请教高手,如何才能把子控件show出来啊。
我搜索到的一些答案似乎不起作用:
1. 子控件paintTo
2. 在UpdateLayeredWindow调用前,先调用SetLayeredWindowAttributes,把子控件显示出来
这两个方法我都没有试验成功,也许是我的方法不对,还请高人指点一下,谢谢!
我搜索到的一些答案似乎不起作用:
1. 子控件paintTo
2. 在UpdateLayeredWindow调用前,先调用SetLayeredWindowAttributes,把子控件显示出来
这两个方法我都没有试验成功,也许是我的方法不对,还请高人指点一下,谢谢!
解决方案 »
- 已知进程名 'aaa.exe' 如何根据 'aaa.exe' 简单的获得句柄。
- 有什么办法做个定时检查程序更新的小程序吗?
- Delphi开发Sqlserver数据库问题……
- 请问一下。delphi连什么数据库好?
- 如和连接文本文件a.txt、b.txt里的内容,生成文件c.txt或者a.txt.
- 如何查询如此条件下的数据集?
- CRC校验
- 客户端取得数据后,AppServer上的数据集是关闭了还是开着的?
- 关于数据库恢复的问题*37分详细的话再加50分*
- 有两个Query.一个已经选择了一个数据集,我想让另一个在它的基础上再进行选择,就像关联差不多,该如何实现??
- Type of expression must be BOOLEAN
- 在线等看看.有个问题,有人做过吗?image中的图像数据,怎么传给com.
var
AControl : TControl;
A, Margin, X, Y, CtlX, CtlY : Integer;
begin
Margin := ( Width - ClientWidth ) div 2;
FullRgn := CreateRectRgn(0, 0, Width, Height);
X := Margin;
Y := Height - ClientHeight - Margin;
ClientRgn := CreateRectRgn( X, Y, X + ClientWidth, Y + ClientHeight );
CombineRgn( FullRgn, FullRgn, ClientRgn, RGN_DIFF );
for A := 0 to ControlCount - 1 do begin
AControl := Controls[A];
if ( AControl is TWinControl ) or ( AControl is TGraphicControl )
then with AControl do begin
if Visible then begin
CtlX := X + Left;
CtlY := Y + Top;
CtlRgn := CreateRectRgn( CtlX, CtlY, CtlX + Width, CtlY + Height );
CombineRgn( FullRgn, FullRgn, CtlRgn, RGN_OR );
end;
end;
end;
SetWindowRgn(Handle, FullRgn, TRUE);
以前写的函数,搂主参考下