coucou les delphiens :d
le problème est que mon image ne s'affiche pas dans la forme que j'ai créé a la volé, j'ai tenté en bmp, et en jpg, rien a faire la form reste grise avec rien dedans et il n'y a pas de message d'erreur :s
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 procedure TForm1.Apropos1Click(Sender: TObject); var my_picture : TImage; photo : string; begin my_form := TForm.Create(self); with my_form do begin BorderStyle := bsNone; Position := poScreenCenter; Visible := true; end; my_picture := TImage.Create(my_form); with my_picture do begin photo := Application.GetNamePath + 'vnp1.bmp'; if FileExists(photo) then begin my_picture.Picture.LoadFromFile(photo); left:=0; top:=0; //AutoSize := true; height:=100; width:=100; Visible := true; end else ShowMessage('La photo est introuvable'); end; end;
Partager