Autor Beitrag
max1235
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37

win 98 (aber so gut wie nie dran), win xp, win vista, xandros
delphi(delphi3+7), c#(MV), c++(codeblocks;noch ganz am Anfang vom Lernen)
BeitragVerfasst: So 14.02.10 14:15 
Hallo Leute!

Ich mache eine Anwendung, in der man erst mit openpicturedialog ein Bild lädt und dann einfach mit einem Button aufs nächste Bild in diesem Ordner zugreifen kann. Mein Problem ist: Wie kann ich machen, dass Delphi das nächste Bild im Ordner lädt?

WICHTIG: Bilder sind jpg-Dateien

Danke für alle Antworten

_________________
Max Kreie
Einige Wissen viel, andere wenig(er). Dafür sind Foren da.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: So 14.02.10 14:17 
Dateien im Ordner suchen (Ordner mit ExtractFiePath, Auflisten mit FindFirst\FindNext\FindClose), in ner Stringliste speichern und dann mit TStringList.IndexOf aktuelles Bild suchen, und nächstes aus der StringList holen, wie gehabt das neue Bild laden.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
max1235 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37

win 98 (aber so gut wie nie dran), win xp, win vista, xandros
delphi(delphi3+7), c#(MV), c++(codeblocks;noch ganz am Anfang vom Lernen)
BeitragVerfasst: So 14.02.10 14:19 
Danke

Wie geht das mit dem findnext?

_________________
Max Kreie
Einige Wissen viel, andere wenig(er). Dafür sind Foren da.
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: So 14.02.10 14:28 
in der Delphi-Hilfe ist afaik ein wunderbares Beispiel zu findfirst und findnext.

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
max1235 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37

win 98 (aber so gut wie nie dran), win xp, win vista, xandros
delphi(delphi3+7), c#(MV), c++(codeblocks;noch ganz am Anfang vom Lernen)
BeitragVerfasst: So 14.02.10 14:32 
In der Hilfe hab ich nichts gutes gefunden (Delphi 7, Englisch).

_________________
Max Kreie
Einige Wissen viel, andere wenig(er). Dafür sind Foren da.
Xion
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
EE-Maler
Beiträge: 1952
Erhaltene Danke: 128

Windows XP
Delphi (2005, SmartInspect), SQL, Lua, Java (Eclipse), C++ (Visual Studio 2010, Qt Creator), Python (Blender), Prolog (SWIProlog), Haskell (ghci)
BeitragVerfasst: So 14.02.10 15:04 
Guck mal im Forum nach TSearchRec

_________________
a broken heart is like a broken window - it'll never heal
In einem gut regierten Land ist Armut eine Schande, in einem schlecht regierten Reichtum. (Konfuzius)
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19315
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 14.02.10 15:15 
In der Delphi 7 Hilfe gibt es das selbe Beispiel wie in der derzeitigen Online-Hilfe:
docs.embarcadero.com...sUtils_FindNext.html

Und hier in der Library findest du auch genug...
ffgorcky
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 573

WIN XP/2000 & 7Prof (Familie:Win95,Win98)

BeitragVerfasst: So 14.02.10 15:43 
Also ich würde dafür eine FileListBox nehmen, der ich das Verzeichnis übertrage und dann dort einfach Indexweise durchgehen. - Oder habe ich Dich falsch verstanden?
Das wäre doch - denke ich zumindest - die einfachste Lösung.

Dass Du unter Uses die JPEG-Unit mit einbindest, denke ich weißt Du. - Oder warum hast Du das so extra hingeschrieben?


Zuletzt bearbeitet von ffgorcky am So 14.02.10 15:46, insgesamt 1-mal bearbeitet
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19315
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 14.02.10 15:45 
Diese Komponente ist erstens nur für die visuelle Anzeige sinnvoll geeignet und zweitens steht diese nicht ohne Grund unter Win 3.1.