I want to fade an image into a picture box.
Basically make the picture box go from black to my image, in several seconds.
Could someone please point me in the right durrection.
I have no clue where to start:confused:
Thanks
Printable View
I want to fade an image into a picture box.
Basically make the picture box go from black to my image, in several seconds.
Could someone please point me in the right durrection.
I have no clue where to start:confused:
Thanks
Bump;)
Hi.
The code might need a little cleaning up :D but you should get the idea.
VB Code:
Dim Img As Image = PictureBox1.Image.Clone Dim G As Graphics = PictureBox2.CreateGraphics Dim S As Single = 1 Dim cm As New Imaging.ColorMatrix() Dim attr As New Imaging.ImageAttributes() G.Clear(Color.Black) Do While S >= 0 cm.Matrix00 = S 'Multiply the red color cm.Matrix11 = S 'Multiply the green color cm.Matrix22 = S 'Multiply the blue color attr.SetColorMatrix(cm) G.DrawImage(Img, New Rectangle(0, 0, Img.Width, Img.Height), 0, 0, Img.Width, Img.Height, GraphicsUnit.Pixel, attr) Application.DoEvents() S = S - 0.05 Loop
That works great!
But How do I reverse it? (From Black to Picture "Fade In" the picture)
Nevermind I figured out!
Thanks for the help:wave:
Anytime..:wave: