unit Unit1;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,<br> StdCtrls;<br><br>const WM_MYSHOWOPENDIALOG=WM_USER+1000;<br><br>type<br><br> TForm1 = class(TForm)<br> OpenDialog1: TOpenDialog;<br> Button1: TButton;<br> procedure Button1Click(Sender: TObject);<br> procedure OpenDialog1Show(Sender: TObject);<br> private<br> { Private declarations }<br> procedure MyShowOpenDialog(var Message:TMessage);message WM_MYSHOWOPENDIALOG;<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br><br>implementation<br><br>{$R *.DFM}<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br> OpenDialog1.Execute;<br>end;<br><br>procedure TForm1.MyShowOpenDialog(var Message: TMessage);<br>begin<br> SetWindowPos(GetParent(OpenDialog1.Handle),HWND_TOP,100,100,400,300, SWP_SHOWWINDOW)<br>end;<br><br>procedure TForm1.OpenDialog1Show(Sender: TObject);<br>begin<br> PostMessage(Handle,WM_MYSHOWOPENDIALOG,0,0);<br>end;<br><br>end.<br>