Página 1 de 1

Painting from scratch

Publicado: Mié Jul 18, 2007 11:49 pm
por Guest
Hi,
How do you paint a rectangle or other shape, from scratch, on an empty form?
The Canvas class is mentioned in the help, but there aren't any samples
that specifically illustrate creating an image or paint object from scratch.
My form is completely empty, except for a button that starts the Painting
test. I want to experiment to filling the Image with multiple colors. What
is the simplest way to do this?

Painting from scratch

Publicado: Jue Jul 19, 2007 1:06 pm
por jfgimenez
DGauss,
> How do you paint a rectangle or other shape, from scratch, on an empty
> form?
> The Canvas class is mentioned in the help, but there aren't any samples
> that specifically illustrate creating an image or paint object from
> scratch.
>
> My form is completely empty, except for a button that starts the Painting
> test. I want to experiment to filling the Image with multiple colors.
> What
> is the simplest way to do this?
You should do the painting in the form's OnPainted event. Attached is a
small sample.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info


Attached files Painting.zip (1.4 KB)Â

Painting from scratch

Publicado: Jue Jul 19, 2007 5:58 pm
por Guest
A simple example is exactly what I was looking for. It's clear now, thank
you sir.