FloodFill problem 
Author Message
 FloodFill problem

I am trying to use the FloodFill API to fill a region on a picturebox. This
code works just fine under form_Load, but when I put it under
picture1_Mousedown(or mouseup), it doesn't. I need to put it here so that I
can change the "5, 5" to "X, Y". What is wrong?

fill_color = vbBlue
brush = CreateSolidBrush(fill_color)
old_brush = SelectObject(picture1.hdc, brush)
s = FloodFill(picture1.hdc, 5, 5, fill_color)



Sun, 31 Aug 2003 11:20:41 GMT  
 FloodFill problem
Does this code help? ...
http://www.mvps.org/vbnet/code/bitmap/extfloodfill.htm

--

Randy Birch
MVP Visual Basic

Take the vb.net poll at:
http://www.mvps.org/vbnet/
http://www.mvps.org/ccrp/

Please respond only to the newsgroups so all can benefit.


: I am trying to use the FloodFill API to fill a region on a picturebox.
This
: code works just fine under form_Load, but when I put it under
: picture1_Mousedown(or mouseup), it doesn't. I need to put it here so that
I
: can change the "5, 5" to "X, Y". What is wrong?
:
: fill_color = vbBlue
: brush = CreateSolidBrush(fill_color)
: old_brush = SelectObject(picture1.hdc, brush)
: s = FloodFill(picture1.hdc, 5, 5, fill_color)
:
:
:



Sun, 31 Aug 2003 12:09:06 GMT  
 FloodFill problem
no, actually it doesn't even work when I tried it

Quote:
> Does this code help? ...
> http://www.mvps.org/vbnet/code/bitmap/extfloodfill.htm

> --

> Randy Birch
> MVP Visual Basic

> Take the vb.net poll at:
> http://www.mvps.org/vbnet/
> http://www.mvps.org/ccrp/

> Please respond only to the newsgroups so all can benefit.



> : I am trying to use the FloodFill API to fill a region on a picturebox.
> This
> : code works just fine under form_Load, but when I put it under
> : picture1_Mousedown(or mouseup), it doesn't. I need to put it here so
that
> I
> : can change the "5, 5" to "X, Y". What is wrong?
> :
> : fill_color = vbBlue
> : brush = CreateSolidBrush(fill_color)
> : old_brush = SelectObject(picture1.hdc, brush)
> : s = FloodFill(picture1.hdc, 5, 5, fill_color)
> :
> :
> :



Sun, 31 Aug 2003 23:10:01 GMT  
 FloodFill problem
Set the FillStyle of the pixbox to 0 - Solid. The default is transparent.
Also Autoredraw should be true, and the picture scalemode pixel.

--

Randy Birch
MVP Visual Basic

Take the vb.net poll at:
http://www.mvps.org/vbnet/
http://www.mvps.org/ccrp/

Please respond only to the newsgroups so all can benefit.


: no, actually it doesn't even work when I tried it


: > Does this code help? ...
: > http://www.mvps.org/vbnet/code/bitmap/extfloodfill.htm
: >
: > --
: >
: > Randy Birch
: > MVP Visual Basic
: >
: > Take the vb.net poll at:
: > http://www.mvps.org/vbnet/
: > http://www.mvps.org/ccrp/
: >
: > Please respond only to the newsgroups so all can benefit.
: >
: >
: >


: > : I am trying to use the FloodFill API to fill a region on a picturebox.
: > This
: > : code works just fine under form_Load, but when I put it under
: > : picture1_Mousedown(or mouseup), it doesn't. I need to put it here so
: that
: > I
: > : can change the "5, 5" to "X, Y". What is wrong?
: > :
: > : fill_color = vbBlue
: > : brush = CreateSolidBrush(fill_color)
: > : old_brush = SelectObject(picture1.hdc, brush)
: > : s = FloodFill(picture1.hdc, 5, 5, fill_color)
: > :
: > :
: > :
: >
: >
:
:



Mon, 01 Sep 2003 07:01:30 GMT  
 FloodFill problem
I made an error in the posted code to the site ... the Load event wrongly
set properties for the Form.  The With statement should have been "With
Picture1", not "With Form1". Make that change and try.

--

Randy Birch
MVP Visual Basic

Take the vb.net poll at:
http://www.mvps.org/vbnet/
http://www.mvps.org/ccrp/

Please respond only to the newsgroups so all can benefit.


: Set the FillStyle of the pixbox to 0 - Solid. The default is transparent.
: Also Autoredraw should be true, and the picture scalemode pixel.
:
: --
:
: Randy Birch
: MVP Visual Basic
:
: Take the vb.net poll at:
: http://www.mvps.org/vbnet/
: http://www.mvps.org/ccrp/
:
: Please respond only to the newsgroups so all can benefit.
:
:
:

: : no, actually it doesn't even work when I tried it


: : > Does this code help? ...
: : > http://www.mvps.org/vbnet/code/bitmap/extfloodfill.htm
: : >
: : > --
: : >
: : > Randy Birch
: : > MVP Visual Basic
: : >
: : > Take the vb.net poll at:
: : > http://www.mvps.org/vbnet/
: : > http://www.mvps.org/ccrp/
: : >
: : > Please respond only to the newsgroups so all can benefit.
: : >
: : >
: : >


: : > : I am trying to use the FloodFill API to fill a region on a
picturebox.
: : > This
: : > : code works just fine under form_Load, but when I put it under
: : > : picture1_Mousedown(or mouseup), it doesn't. I need to put it here so
: : that
: : > I
: : > : can change the "5, 5" to "X, Y". What is wrong?
: : > :
: : > : fill_color = vbBlue
: : > : brush = CreateSolidBrush(fill_color)
: : > : old_brush = SelectObject(picture1.hdc, brush)
: : > : s = FloodFill(picture1.hdc, 5, 5, fill_color)
: : > :
: : > :
: : > :
: : >
: : >
: :
: :
:
:



Mon, 01 Sep 2003 07:06:43 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Floodfill problem still occurring

2. FloodFill problems....

3. FloodFill Problems in VB4.0

4. Problem with FloodFill

5. problem with floodfill and printer

6. problem with floodfill and printer

7. Problem with FloodFill

8. FloodFill

9. Help with FloodFill

10. How to use a special texture using FloodFill ?

11. FloodFill in image? - VB4 32bit

12. FloodFill in image? VB4 32bit

 

 
Powered by phpBB® Forum Software