Autor Beitrag
Jagg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Do 20.11.03 21:21 
Hallo Leute !

In Windows kann man ja nach Dateien oder Ordnern suchen und dabei gibt es auch eine Auswahl,auf welchem Laufwerk oder im welchem Order der PC suchen soll !
Wie geht das in Delphi ???

Jagg !
FloSch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 129



BeitragVerfasst: Do 20.11.03 21:31 
FindFirst / FindNext

OH hat folgendes geschrieben:

Searches for the first instance of a file name with a given set of attributes in a specified directory.

function FindFirst(const Path: string; Attr: Integer; var F: TSearchRec): Integer;


und

OH hat folgendes geschrieben:

Returns the next entry matching the name and attributes specified in a previous call to FindFirst.

function FindNext(var F: TSearchRec): Integer;


Weiteres in der OH.

Gruß
Florian

_________________
Windows 200 Prof. - Debian Sarge
D5 Prof & D6 PE - Kylix 3 Professional - Free Pascal
Jagg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Do 20.11.03 21:37 
das meine ich nicht ich weiss wie das suchen geht,aber ich möchte nur eine auswahl haben wo ich wählen kann in welchem ordner ich suchen will
und dann soll er den pfad in ein editfeld schreiben
FloSch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 129



BeitragVerfasst: Do 20.11.03 21:42 

_________________
Windows 200 Prof. - Debian Sarge
D5 Prof & D6 PE - Kylix 3 Professional - Free Pascal
Adrian
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 314



BeitragVerfasst: Fr 21.11.03 12:11 
Servus!

Das geht ungefähr so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.StartClick(Sender: TObject);
var
  Dir: String;
begin
    if SelectDirectory(Dir, [sdAllowCreate, sdPerformCreate, sdPrompt],1000) then
    begin
      Edit1.Text:=Dir;
    end;
end;


Hab's aus einem bestehenden Programm gekürzt, müßte aber klappen.

Gruß,

Adrian