![]() |
Re: bild aus imagelist in Image
ich hab schon wieder ein problem...
Delphi-Quellcode:
funktioniert nicht, kein bild, keine reaktion... :wall:
procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
var BM: TBitmap; begin if Key=#37 then begin BM := TBitmap.Create; try Imglist1.GetBitmap(1, BM); image1.Picture.Bitmap.Assign(BM); finally BM.Free; end; end; if Key=#38 then begin BM := TBitmap.Create; try Imglist1.GetBitmap(3, BM); image1.Picture.Bitmap.Assign(BM); finally BM.Free; end; end; if Key=#39 then begin BM := TBitmap.Create; try Imglist1.GetBitmap(2, BM); image1.Picture.Bitmap.Assign(BM); finally BM.Free; end; end; if Key=#40 then begin BM := TBitmap.Create; try Imglist1.GetBitmap(0, BM); image1.Picture.Bitmap.Assign(BM); finally BM.Free; end; end; end; |
Re: bild aus imagelist in Image
Hi,
Zuerst einmal: Bist du sicher, dass das die richtigen Tastencodes sind? :zwinker: Denn:
Code:
Evtl. hast du auch vergessen die Eigenschaft KeyPreview der Form auf true zu stellen.
#37 = %
#38 = & #39 = ' #40 = ( Ansonsten sieht der Code nämlich richtig aus. :gruebel: |
Re: bild aus imagelist in Image
ich hab mir mal ein programm geschrieben um mir die tastencodezahlen anzeigen zu lassen, da war alles richtig(a=65,b=66) und früher hat auch immer alles so geklappt, aber vllt. geht 37-40 nur bei KeyDown... , aber egal ich habs schön längst wieder hingekriegt :mrgreen:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:23 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