| View previous topic :: View next topic |
| Author |
Message |
Jake Guest
|
Posted: Sat Jan 03, 2004 6:14 am Post subject: Drawing Shapes |
|
|
Hi,
I need to draw a rectangle on a form that is to be drawn once and will
remain when an application opens on top of it.
ie the rectangle will not have to be refreshed.
I tried using the canvas->Rectangle but when another application is opened
and closed the rectangle is gone ie the form will need to be refreshed.
Jake
|
|
| Back to top |
|
 |
Hans Galema Guest
|
Posted: Sun Jan 04, 2004 10:38 am Post subject: Re: Drawing Shapes |
|
|
Jake wrote:
| Quote: | I need to draw a rectangle on a form that is to be drawn once and will
remain when an application opens on top of it.
ie the rectangle will not have to be refreshed.
|
But, if you placed that drawing code in the FormPaint() event it
would be repainted when needed.
| Quote: | I tried using the canvas->Rectangle but when another application is opened
and closed the rectangle is gone ie the form will need to be refreshed.
|
Yes, that is normal behaviour. If you really only want to draw once you
could use a TImage and draw once on it.
Hans.
|
|
| Back to top |
|
 |
Jake Guest
|
Posted: Thu Jan 08, 2004 5:53 am Post subject: Re: Drawing Shapes |
|
|
Hi,
Thanks Hans for your advise.
How does one place the drawing code in the FormPaint()event?
Jake
"Hans Galema" <dontusethis (AT) dontusethis (DOT) nl> wrote
| Quote: | Jake wrote:
I need to draw a rectangle on a form that is to be drawn once and will
remain when an application opens on top of it.
ie the rectangle will not have to be refreshed.
But, if you placed that drawing code in the FormPaint() event it
would be repainted when needed.
I tried using the canvas->Rectangle but when another application is
opened
and closed the rectangle is gone ie the form will need to be refreshed.
Yes, that is normal behaviour. If you really only want to draw once you
could use a TImage and draw once on it.
Hans.
|
|
|
| Back to top |
|
 |
|