
Filling the picture box eith the color of a common dialog selected color
Quote:
> Hi there,
> I'm after wiping an image from a picture box and filling it with a color
> that is selected using the commondialog control color palette. I've tried
> to do this myself but so far it does nothing but crash. Can someone help
> me.
You could either set the BackColor property of the picturebox and call the
Cls method, or use the Floodfill API after a .Cls call (will flicker).
Private Declare Function FloodFill lib "gdi32" ( ByVal hDC As Long, ByVal
nXStart As Long, ByVal nYStart As Long, ByVal crFill As Long ) As Long
Pass it the hDC of the picture box and that should do the trick without
crashing.