Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   canvas brush color clBlack geht nicht (https://www.delphipraxis.net/191284-canvas-brush-color-clblack-geht-nicht.html)

Der schöne Günther 29. Dez 2016 17:17

AW: canvas brush color clBlack geht nicht
 
Zitat:

Zitat von EWeiss (Beitrag 1357475)
Nochmal step by step

Warum kein
Delphi-Quellcode:
try..finally
?

EWeiss 29. Dez 2016 17:20

AW: canvas brush color clBlack geht nicht
 
Zitat:

Zitat von Der schöne Günther (Beitrag 1357477)
Zitat:

Zitat von EWeiss (Beitrag 1357475)
Nochmal step by step

Warum kein
Delphi-Quellcode:
try..finally
?

Ja ;)
Ich wollte ihn als Anfänger nicht verwirren..
Aber bitte.
Delphi-Quellcode:
var
   Bitmap: TBitmap;
begin
   
   Bitmap := TBitmap.Create;
   try
     try
     // zeichne oder mach was mit Bitmap
     // ...
     except // Tritt ein Fehler auf gebe ihn aus
       MessageBox(bla, bla..);
       Bitmap.Free;
     end;
   finally // Alles klar und kein Fehler
     // Speicher Freigeben
     Bitmap.Free;
     // oder Speicher Freigeben und das Object TBitmap auf Nil setzen.    
     FreeAndNil(Bitmap);
   end;
end


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:23 Uhr.
Seite 2 von 2     12   

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