Autor Beitrag
Tilo
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1098
Erhaltene Danke: 13

Win7 geg. WInXP oder sogar Win98
Rad2007
BeitragVerfasst: Mo 12.07.04 15:56 
Ich habe ein Problem mit der Klasse System.Windows.Forms.PictureBox in delphi8.
der Code lautet:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
mypicture:=picturebox.create;
with mypicturebox do 
begin
 left:=10;
 top:=10;
 height:=50;
 width:=50;
 backgroundimage:=bitmap.fromfile('bild.bmp');
end;

'bild.bmp' ist ein passendes Bild. mypicture ist global als Picturebox deklariert.
Aber trotzdem wird das Bild nicht angezeigt.
Welchen Denkfehler habe ich begangen?

Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 12.07.04 16:32 
du hast kein parent gesetzt, wo sollte also die komponente angezeigt werden? :wink:
Tilo Threadstarter
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1098
Erhaltene Danke: 13

Win7 geg. WInXP oder sogar Win98
Rad2007
BeitragVerfasst: Mo 12.07.04 18:27 
@jaenicke
Danke. Ich hatte diesen Fehler glaube ich schonmal mit einer anderen Komponente :D :lol: 8) :idea: