Repositioning common dialogs

procedure TForm1.OpenDialog1Show(Sender: TObject);
var
hwnd: THandle;
rect: TRect;
dlgWidth, dlgHeight: integer;
begin
hwnd := GetParent(OpenDialog1.Handle);
GetWindowRect(hwnd, rect);
dlgWidth := rect.Rightrect.
Left;
dlgHeight := rect.Bottomrect.
Top;
MoveWindow(hwnd, Left+(WidthdlgWidth)
div 2, Top+(HeightdlgHeight)
div 2,
dlgWidth, dlgHeight, true);
Abort;
end;