Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi loadfromfile bei Timage (https://www.delphipraxis.net/20708-loadfromfile-bei-timage.html)

glkgereon 21. Apr 2004 22:00


loadfromfile bei Timage
 
Liste der Anhänge anzeigen (Anzahl: 1)
was mach ich nur falsch?
kann sein das ich schon was müde bin, aber komisch isses schon

ich find den fehler nicht

es handelt sich hier um den anfang eines mühle-programms

speziell geht es um die procedure image1onclick

hier is ne fehlermeldung?
warum?

hat wer ne andere lösung
ich will einfach nur das
bei click soll er das bild laden, sonst nix

fkerber 21. Apr 2004 22:16

Re: loadfromfile bei Timage
 
Hi!

Ich kann dir sagen, dass der Fehler hier liegt:

Delphi-Quellcode:
if [...] (image1.Picture.Graphic.Empty=true)
Was da allerdings falsch ist, weiß ich nicht.

Du solltest nach dem Zug des Weißen, weißamzug auf false setzen.

Ciao fkerber

himitsu 21. Apr 2004 22:24

Re: loadfromfile bei Timage
 
Ich weiß auch nicht, warum es nicht geht :gruebel:


aber mit image1.Picture.Bitmap.Empty geht's:
Delphi-Quellcode:
if (weissamzug=true) and (image1.Picture.Bitmap.Empty=true)
then Image1.Picture:=Imagewhite.Picture
else if (weissamzug=false) and (image1.Picture.Bitmap.Empty=true)
then Image1.Picture:=Imageblack.Picture;
etwas gekürzt
Delphi-Quellcode:
if weissamzug and image1.Picture.Bitmap.Empty
then Image1.Picture:=Imagewhite.Picture
else if (not weissamzug) and image1.Picture.Bitmap.Empty
then Image1.Picture:=Imageblack.Picture;

Markus K. 21. Apr 2004 22:37

Re: loadfromfile bei Timage
 
Hallo glkbkk,
bei mir geht es auch nur mit Bitmap, wobei es beim ersten mal noch keine Fehlermeldung gibt erst beim zweiten Mal :gruebel:
Und noch mal etwas verkürzt.
Delphi-Quellcode:
if image1.Picture.Bitmap.Empty
then if weissamzug then Image1.Picture:=Imagewhite.Picture
else if not(weissamzug) then Image1.Picture:=Imageblack.Picture;
Tschüß Markus

himitsu 21. Apr 2004 22:51

Re: loadfromfile bei Timage
 
OK, dann aber nochmehr ;)

Delphi-Quellcode:
if image1.Picture.Bitmap.Empty
then if weissamzug then Image1.Picture:=Imagewhite.Picture
else Image1.Picture:=Imageblack.Picture;

glkgereon 22. Apr 2004 16:07

Re: loadfromfile bei Timage
 
ok, also ihr könnt mir meine quelltext zusammenstauchen, aber warums nit funzt wisst ihr auch nicht wirklich, oder?

himitsu 22. Apr 2004 16:13

Re: loadfromfile bei Timage
 
Es sollte ja mit Graphic funktionieren, aber es macht es halt nicht.

Aber Bitmap (image1.Picture.Bitmap.Empty) geht's doch schließlich auch, da ja BitMap in den 2 Image's drin sind ;)


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:49 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz