öhmmm... was mach ich falsch:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
odd : TOpenDirDialog;
begin
odd := TOpenDirDialog.Create(Self);
odd.Caption := 'Ordner auswählen';
odd.Title := 'Einen Ordner auswählen:';
odd.Root := 'rfDesktop';
odd.InitialDir := 'D:\';
odd.Height := 365;
odd.Left := 0;
odd.Top := 0;
odd.Width := 330;
odd.Position := TPosition(4);
odd.Options := [odCaption, odTitle, odEdit];
if odd.Execute then
Edit1.Text := odd.Path;
FreeAndNil(odd);
end;
Zitat:
Access violation at address 0050070A in module 'Test.exe'. Read of address 00000008.