Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-06

Show image on the backgroud of a Form

6 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

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');

    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 .

#lazarus-br em irc.freenode.org #lazarusportugal em irc.ptnet.org(Cloud IRC em lazarusportugal.org/doku.php/irc) Em caso de d?vida sobre o cliente a usar clique em http://lazarusportugal.org/doku.php/duvidas_irc Juntem-se a estes fant?sticos IRC's sobre Lazarus

Reply by email

Mattias Gaertner
to Unknown author

On Mon, 06 Jun 2011 13:02:37 +0100
""

Show quoted text 5 lines
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

Reply by email

Graeme Geldenhuys
to Unknown author
The background of the form is empty.

Double check your code! I just tried the example you linked too.

http://www.codefoot.com/delphi/form_background_image.shtml

...and it works perfectly. I used the LCL-qt widgetset under Linux. I added two additional components, just to show that the background is indeed behind the two gui components.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot-Form1.png Type: image/png Size: 25059 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110606/de1238b8/attachment-0001.png>

Reply by email

Unknown author
to Graeme Geldenhuys
Graeme Geldenhuys wrote 22 lines
On 06/06/2011 14:38, wrote: > The background of the form is empty. Double check your code! I just tried the example you linked too. http://www.codefoot.com/delphi/form_background_image.shtml ...and it works perfectly. I used the LCL-qt widgetset under Linux. I added two additional components, just to show that the background is indeed behind the two gui components. Regards, - Graeme - -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

I think that is because the version I use the version 0.9.31 fpc 2.4.2

#lazarus-br em irc.freenode.org #lazarusportugal em irc.ptnet.org(Cloud IRC em lazarusportugal.org/doku.php/irc) Em caso de d?vida sobre o cliente a usar clique em http://lazarusportugal.org/doku.php/duvidas_irc Juntem-se a estes fant?sticos IRC's sobre Lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110606/989ca8cf/attachment.html>

Reply by email

Unknown author
to Graeme Geldenhuys: Double check your code! I just tried the example you linked too.…
Graeme Geldenhuys wrote 22 lines
On 06/06/2011 14:38, wrote: > The background of the form is empty. Double check your code! I just tried the example you linked too. http://www.codefoot.com/delphi/form_background_image.shtml ...and it works perfectly. I used the LCL-qt widgetset under Linux. I added two additional components, just to show that the background is indeed behind the two gui components. Regards, - Graeme - -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

I never use release versions of Lazarus.

#lazarus-br em irc.freenode.org #lazarusportugal em irc.ptnet.org(Cloud IRC em lazarusportugal.org/doku.php/irc) Em caso de d?vida sobre o cliente a usar clique em http://lazarusportugal.org/doku.php/duvidas_irc Juntem-se a estes fant?sticos IRC's sobre Lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110606/27361ab9/attachment.html>

Reply by email