
29.03.2010, 21:34
|
|
Познающий
Регистрация: 21.11.2009
Сообщений: 77
С нами:
8668804
Репутация:
29
|
|
Сообщение от s0l_ir0n
PHP код:
function CenterWindow(Wnd:HWND):boolean;
var
R:TRect;
X,Y,W,H:integer;
begin
GetWindowRect(Wnd, R);
W:=GetSystemMetrics(SM_CXSCREEN);
H:=GetSystemMetrics(SM_CYSCREEN);
X := (W div 2) - ((R.Right - R.Left) div 2);
Y := (H div 2) - ((R.Bottom - R.Top) div 2);
result:=SetWindowPos(Wnd, 0, X, Y, 0, 0, SWP_NOSIZE or SWP_NOZORDER or SWP_NOACTIVATE)
end;
Спасибо!
А как считать содержимое edit1?
|
|
|