-
I have tried to draw a simple line on an Image (rather than a picturebox) due to the image being capable of stretching while the picturebox is not.
For example I tried:
hPen = CreatePen(0, 1, RGB(255, 0, 0))
SelectObject Image1.Picture.Handle, hPen
Ellipse Image1.Picture.Handle, 5, 5, 30, 30
Image1.Refresh
to draw a simple ellipse on the image. Nothing appears. Is there any way to draw directly to an Image?
-
ImageBoxes are just for decorations. They hardly do anything.
-
Use a picturebox, and look at the documentation for StretchBlt, which allows you to draw the image to a memory space, then do a "stretching block transfer" to the picturebox's hDC (device context).