Autor Beitrag
DelphiDelphin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Sa 26.03.05 17:52 
Hi wie kann ich ne Bildaschau erstellen also es soll Zwei Buttons geben einen für weiter dann wir dass nächste bild gezeigt und einen zurück dann wird dass letzte bild nochmals gezeigt und wenn man dann auf dass bild klickt wird es in einem neuen grossen Fenster angezeigt.

Hat jemand Hilfe ?

Moderiert von user profile iconTino: Titel geändert.
Hein Blöd
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 51



BeitragVerfasst: Sa 26.03.05 18:03 
Was willst du wissen? Das was du fragst ist ein ganzes Programm. Willst du ein Tipp oder ein Programm?
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Sa 26.03.05 18:06 
Wo liegt das Problem :)

Du nimmst ein (kleines) TImage.

Wenn du einen bestimmten Ordner hast, in dem die Bilder sind, dann gibts zwei möglichkeiten an die Dateinamen zu kommen: Entweder mit Suche in: Delphi-Forum, Delphi-Library FINDFIRST und Suche in: Delphi-Forum, Delphi-Library FINDNEXT, oder du machst es dir ganz einfach und nimmst die TFileListBox aus der Registerkarte "Win 3.1".

Wenn die Bilder für deine Slideshow z.B. im Verz. c:\Bilder\ liegen, dann stellst du als Directory das ein.

Dann nimmst du eine globale Zählvariable. Für den Bildwechselbutton kannst du z.B. den Code nehmen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
var
 Form1 : TForm;
 bildnummer : integer = 0;


[...]

procedure Tform1.Create(Sender: TObject);
begin
 filelistbox1.directory := 'c:\bilder\'
end;
 
procedure TForm1.Button1Click(Sender: TObject);
begin
 inc(bildnummer); //Bildnummer um eins erhöhen
 image1.picture.loadfromFile(filelistbox1.directory +
                             filelistbox1.items[bildnummer])
end;

procedure groesseranzeigen;
var zoompicture : TImage;
begin
 ZoomPicture := Timage.Create(form1);
 Zoompicture.SetBounds(0,0, width, height);
 zoompicture.parent := form1;
 zoompicture.image := image1.picture;
 zoompicture.stretch := true;
end;


so in der richtung musst du das machen. Der Code ist btw. nicht copy&paste geeignet. Aber es sollte jetzt ein leichtes für dich sein das noch selbst hinzu bekommen ;)


Zuletzt bearbeitet von Karlson am Sa 26.03.05 18:09, insgesamt 1-mal bearbeitet
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Sa 26.03.05 18:06 
Einen tipp vorallem für die Biladschau :wink:
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Sa 26.03.05 18:08 
Sach mal, dir ist schon klar das das dingens bilderschau heisst, oder machst du den Fehler absichtlich :lol: