Autor Beitrag
HBriele
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 80



BeitragVerfasst: Fr 27.05.05 21:48 
Hallo,
habe schon vergebens gesucht!
Gibt es eine Möglichkeit abzufragen, ob TImage ein Bild geladen hat?
Also ein Bild drin ist oder nicht?

Danke schon mal.

Gruß
feivel3333
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 190

W7
Delphi XE prof
BeitragVerfasst: Sa 28.05.05 00:01 
Hi,
Ich denke, die Eigenschaft Image.Picture dürfte NULL oder NIL sein, wenn kein Bild
geladen ist.

Gruß, Feivel
HBriele Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 80



BeitragVerfasst: Sa 28.05.05 00:10 
user profile iconfeivel3333 hat folgendes geschrieben:
Hi,
Ich denke, die Eigenschaft Image.Picture dürfte NULL oder NIL sein, wenn kein Bild
geladen ist.


Hallo,
Das TImage hat kein Properie Image.Picture

Gruß
feivel3333
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 190

W7
Delphi XE prof
BeitragVerfasst: Sa 28.05.05 00:15 
Ähm, von welchem Delphi sprichst du? Mein Delphi hat sehr wohl dieses Property.
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: Sa 17.03.07 11:58 
dieses Topic is zwar schon ewig alt, aber:

Image.Picture ist nie null :(

Wie kann ich denn dann rausfinden, wann das Bild nu leer ist, oder nicht? :eyes:

Xion

_________________
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)
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: Sa 17.03.07 13:31 
zur erklärung:

ausblenden Delphi-Quelltext
1:
2:
3:
   TImage(Dragging).Picture:=nil;
   if TImage(Dragging).Picture=nil then
      beep; //Beept nie!

:shock:

_________________
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)
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Sa 17.03.07 15:50 
ausblenden Delphi-Quelltext
1:
2:
Picture.Bitmap.Empty {bmp}
Picture.Graphic = nil {jpg}

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
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: Sa 17.03.07 19:46 
ok, danke, guck ich mir später mal an. ich benutze zwar pngs, aber das funzt bestimmt trotzdem, mal sehen.

_________________
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)
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Sa 17.03.07 22:10 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
Image1.Picture := nil;

if (Image1.Picture.Width = 0) AND (Image1.Picture.Height = 0) then
  ShowMessage('Kein Bild!');

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Sa 17.03.07 23:56 
user profile iconGTA-Place hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
Image1.Picture := nil;

if (Image1.Picture.Width = 0) AND (Image1.Picture.Height = 0) then
  ShowMessage('Kein Bild!');

Wenn Ich vorher Image auf Nil setze weiß Ich doch schon vorher das da kein Bild ist. :wink:

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: So 18.03.07 08:39 
Er hat aber danach gefragt.
user profile iconXion hat folgendes geschrieben:
Wie kann ich denn dann rausfinden, wann das Bild nu leer ist, oder nicht? :eyes:

Alternative: Setz beim nil-setzen eine Variable auf False, beim Bild laden auf True.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: So 18.03.07 09:15 
Joo stimmt, war ein bischen Quatsch was Ich da geschrieben hab. :wink:

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
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 18.03.07 10:17 
das funktioniert: Picture.Graphic = nil {jpg} :D Danke

mit der Variable kenne ich den Trick mit dem Hint, also, dass man in den Hint schreibt ob ein Pic geladen ist oder nicht. Aber ich hab mir eben gedacht, dass es auch einfacher gehen muss ;)

_________________
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)