[Lazarus] Show image on the backgroud of a Form

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Jun 6 14:11:59 CEST 2011


On Mon, 06 Jun 2011 13:02:37 +0100
"lazarusportugalwebmasters at gmail.com"
<lazarusportugalwebmasters at gmail.com> wrote:

> Hi.
> I got this code at the event on show:
>     background := TBitmap.Create;
>     background.LoadFromFile({Cadeia+'\180px-Grid.bmp}'C:\Documents and 
> Settings\Daniel\Ambiente de trabalho\qqwing\180px-Grid.bmp');

The drawing must be put into the OnPaint event.

>     Form1.Canvas.Draw(0,0,background);


> But it no show any image on the backgroud of my Form.
> This code is from 
> http://www.codefoot.com/delphi/form_background_image.shtml .

This example should work with LCL too. I didn't test.
 
Mattias




More information about the Lazarus mailing list