Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42308

How to use FloodFill

$
0
0
I'm trying to color an area using the FloodFill API

I have a Picturebox with a circle in it. The color of the circle is red and the color of the area around the circle is white.

I want to color the circle blue if user clicks on it

Here is my code which doesn't work

Code:

  '
Private Sub Picture1_Mousedown(Button As Integer, Shift As Integer, x As Single, y As Single)
 Dim ColorUnderMouse As Long
   
 ColorUnderMouse = Picture1.Point(x, y)
 
 Select Case ColorUnderMouse
  Case vbRed
    FloodFill Picture1.hdc, x, y, vbBlue
 End Select
  '
  '


Viewing all articles
Browse latest Browse all 42308

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>