Forum: Sonstige Fragen zu Delphi
Delphi
by DeddyH,
10. Okt 2009
Das Beispiel wird er auch sicherlich auf Anhieb kapieren.
Forum: Sonstige Fragen zu Delphi
Delphi
by DeddyH,
10. Okt 2009
Hier schnell ein Beispiel (hab mal eben Lazarus unter Win7 installiert :mrgreen:):
const Colors: array of TColor = (clRed, clBlue, clYellow, clGreen);
procedure TForm1.FormPaint(Sender: TObject);
var tempBMP: TBitmap;
begin
tempBMP := TBitmap.Create;
try
tempBMP.Width := 100;
tempBMP.Height := 100;
Forum: Sonstige Fragen zu Delphi
Delphi
by DeddyH,
10. Okt 2009
Das OnPaint-Ereignis ist Dir aufgefallen? Was könnte man dort wohl machen? Und Image14.Picture.Destroy; //Destroy sollte niemals direkt aufgerufen werdenist eine ganz schlechte Idee, damit löschst Du das enthaltene Grafik-Objekt, ohne es auf nil zu setzen, deshalb knallt es beim 2. Aufruf.