How do I make a PNG resource?

Example text file (named myres.rc): MYPNG RCDATA mypng.png Added to project: {$R ‘myres.res’ ‘myres.rc’} Example of loading at runtime: uses PngImage; var Png: TPngImage; begin Png := TPngImage.Create; try Png.LoadFromResourceName(HInstance, ‘MYPNG’); Image1.Picture.Graphic := Png; // Image1: TImage on the form finally Png.Free; end; end;

Delphi 2006-2010 error: “Cannot create file C:\Users\Admin\AppData\Local\Temp\EditorLineEnds.ttr”

There are three solutions to this that I am aware of: Try uninstalling the Windows security update KB2982791 which was already mentioned by Francisco Caffagni. This solved the issue for me (Windows 8.1 + Delphi 2007) but it might not be such a good idea to uninstall a Windows security update. Rename the file every … Read more

Is there a way to programmatically tell if particular block of memory was not freed by FastMM?

Even if such handler exist, it would be nearly useless, as everything, including DB would be shut down at the time when FastMM reports leaks. So, I suggest you to turn on LogErrorsToFile along with FullDebugMode conditionals in FastMM4Options.inc. This will give you a text file with leaks, which later you can parse and put … Read more