Bonjour à toutes et à tous,
J'essaye de faire une petite application afin de créer des vignettes des photos au format .jpg contenues dans un dossier.
J'utilise ce code qui affiche bien les vignettes depuis mon dossier, mais je n'ai pas trouvé comment lors d'un clic obtenir une autre information soit agrandir cette image soit un message.
Merci d'avance pour toute aide.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 begin foundlist:=tstringlist.create; try //Voir les fichiers jpg if FindFirst(directorylistbox1.Directory +'\*.jpg', faAnyFile, sr) = 0 then begin foundlist.add(sr.name); while FindNext(sr) = 0 do foundlist.add(sr.name); FindClose(sr); end; x:=0; y:=0; //création des vignettes for i:=0 to FoundList.count-1 do begin anewthumb:=tbi_thumb.create(self); buffer_jpeg.loadfromfile(foundlist[i]); with anewthumb do begin pic:=buffer_jpeg; parent:=scrollbox1; left:=x; top:=y; width:=120; height:=90; visible:=true; inc(x,122); if x>244 then begin x:=0; inc(y,100); end; application.processmessages; end; end; finally foundlist.free; end; end;
@+,
cincap
Partager