Filling the picture box eith the color of a common dialog selected color 
Author Message
 Filling the picture box eith the color of a common dialog selected color

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.

Thanks in advance,

John jones



Mon, 25 Aug 2003 06:23:41 GMT  
 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.



Tue, 02 Sep 2003 21:31:18 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. common color select dialog

2. Color (common) dialog box and palette...

3. Color Common Dialog Box

4. Color Common Dialog Box

5. Problems calling color common dialog box

6. how to change background color of common dialog box

7. Common Dialog Box Color Format

8. How do I get/set what customized colors are in the color dialog box

9. Select color dialog box using commdlg.dll (not ocx)

10. How to display Tables and Borders, Fill, More Colors Dialog from VBA

11. Change a color of a picture box picture

12. VB4: Determine picture box' picture color

 

 
Powered by phpBB® Forum Software