
08.02.2008, 23:32
|
 |
Прохожий
|
|
Регистрация: 08.02.2008
Сообщения: 12
Репутация: 10
|
|
Код:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
OpenDialog1: TOpenDialog;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
function open1:string;
begin
if OpenDialog1.Execute then
open1:=OpenDialog1.filename;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
name:string;
begin
name:=open1;
end;
end.
|