방법1) h := FindWindow( THandle(nil), '<폼 이름>');
if (h<>0) then
beign
SetForegroundWindow(h);
SetActiveWindow( h);
end;
방법2) h := FindWindow( THandle(nil), '<폼 이름>');
if (h<>0) then
beign
SetForegroundWindow(h);
SetActiveWindow( h);
SetWindowPos( h, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE or SWP_NOZORDER or SWP_NOMOVE);
end;
Tags: Delphi FindWindow SetForegroundWindow 윈도우즈
|