Autor Beitrag
Stan_1958
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36



BeitragVerfasst: Fr 25.07.03 07:35 
Tag zusammen,

wieder mal Blackout. Wie kann ich zur Laufzeit eines Programmes, daß in einem Image abgelegte Bild (ico) tauschen? Die vorhandenen Bilder liegen in einem Verzeichnis auf dem PC.

Gruß Stan
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: Fr 25.07.03 07:38 
Einfach mit Image1.Picture.Icon.LoadFromFile('Dateiname.ico');

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Stan_1958 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36



BeitragVerfasst: Fr 25.07.03 08:10 
vielen Dank für deine schnelle Antwort.

Da habe ich aber dann doch gleich noch ne Frage!

Gibt es vielleicht noch eine elegantere Lösung, als das Picture aus einem Verzeichnis zu laden. Das könnte ja bei ein weitergegebenen Anwendung auch mal gelöscht werden und schon fällst Du mit deinem Progrämmchen auf den Bauch! :eyecrazy:

Gruß Stan
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: Fr 25.07.03 08:31 
du kannst das bild in ne imagelist legen und von dort aus aufrufen 8)

_________________
Patrick
im zweifelsfall immer das richtige tun!!!
Terra23
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 872

Win 8
Delphi 7
BeitragVerfasst: Fr 25.07.03 12:01 
@Stan: Oder du baust eine Abfrage:

ausblenden Delphi-Quelltext
1:
2:
3:
If FileExists(Pfad+Dateiname)
Then ...
Else ...

_________________
Hasta La Victoria Siempre
Stan_1958 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36



BeitragVerfasst: Mo 28.07.03 16:41 
Hallo Patrick, könntest Du das mir freundlicherweise in einem 1 oder 2 Zeiler mal zeigen? Imagelist ist also vorhanden mit 3 Bildchen (rote Ampel, gelbe Ampel, grüne Ampel), die ich je nach Programmstatus anzeigen möchte! :?:

Vielen Dank Stan
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: Mo 28.07.03 18:59 
ausblenden Delphi-Quelltext
1:
imagelist1.GetBitmap(0,image1.Picture.Bitmap)					

"0" ist dein index (steht unter den bildern)
und "image1.Picture.Bitmap" die imagekomponente in der das bild angezeigt wird

_________________
Patrick
im zweifelsfall immer das richtige tun!!!