Статьи по Delphi (026)…

Как узнать какое окно закрывает форму.

Как узнать какое окно закрывает форму

Code: //Find windows that may cover another window. Var. HW: HWnd; R: TRect; Begin. Hw := Handle; While IsWindow(hw) Do Begin. Hw := GetWindow( hw, GW_HWNDPREV ); If IsWindowVisible(hw) and not IsIconic( hw ) Then Begin. ... use GetWindowRect( hw, r ) to get candidate windows. Rect and check if it intersects the forms BoundsRects via. IntersectRect. End; End; End;

©Drkb::00513.