wilbert
07-17-2003, 06:04 AM
I know the setpixel API, is there also a way to draw a square of 20 black square pixels on the screen? Because I want to make some sort of fade out on my screen and doing it pixel by pixel takes an eternity!
Wilbert :confused:
SpaceFrog
07-17-2003, 06:31 AM
Private Declare Function FloodFill Lib "gdi32" (ByVal hDestDC as Long, ByVal X1 as Long, ByVal Y1 as Long, ByVal Couleur as Long) as Long
'Fill inside of a closed shape
'Be carefull you don't have leakage ...
'Use as follows :
Picture1.FillStyle = 0
Picture1.FillColor = vbBlue
FloodFill(Picture1.hdc, 100, 100, vbRed)
Picture1.Refresh
wilbert
07-17-2003, 07:02 AM
Thanks it's a nice fade out. But can it be slowed down? Because it goes very fast? Also why is vbRed colored blue in my picturebox?
Tx,
Wilbert
SpaceFrog
07-17-2003, 07:10 AM
Thanks it's a nice fade out. But can it be slowed down? Because it goes very fast? Also why is vbRed colored blue in my picturebox?
Tx,
Wilbert
I dont think you can slow it down...
Be carfull do not get confused between filling color VbBlue and border limit for filling color.
In the example, I ask to fill the zone delimitted by red lines with blue color ...
wilbert
07-17-2003, 07:32 AM
Is there another way to make a nice fade out screen besides the floodfill API, because it goes way too fast?? :confused:
Wilbert
SpaceFrog
07-17-2003, 07:54 AM
Is there another way to make a nice fade out screen besides the floodfill API, because it goes way too fast?? :confused:
Wilbert
try this link :
:huh: (http://www.fastgraph.com/help/fade_vb.html)
or just type "fade fading visual basic" on google search engine ...
depending on what your fading effect should apply I think you will find what you want
wilbert
07-17-2003, 08:01 AM
Thanks, that really helped me out!!!
Wilbert