稹怎么读音:delphi中用form做出来的exe文件运行时怎么能置所有窗口前面

来源:百度文库 编辑:中科新闻网 时间:2024/05/05 11:04:06
有没有简单一点的啊,比如说某数值改变一些

procedure setWindowTopMost;
var p:TPoint;
childWnd,parentWnd:HWND;
begin
GetCursorPos(p);
childWnd:=WindowFromPoint(p);
parentWnd:=GetParent(childWnd);
if parentWnd<>GetDesktopWindow then
begin
SetWindowPos(childWnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE or SWP_NOSIZE);
end;
end;

调用API函数可以