|
-
Mar 16th, 2004, 10:03 PM
#1
Thread Starter
Addicted Member
Images [Resolved]
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
Thanks
Last edited by Hole-In-One; Mar 17th, 2004 at 12:48 PM.
-
Mar 17th, 2004, 08:37 AM
#2
Thread Starter
Addicted Member
Bump
-
Mar 17th, 2004, 09:22 AM
#3
Hi.
The code might need a little cleaning up 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
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
-
Mar 17th, 2004, 12:40 PM
#4
Thread Starter
Addicted Member
That works great!
But How do I reverse it? (From Black to Picture "Fade In" the picture)
-
Mar 17th, 2004, 12:49 PM
#5
Thread Starter
Addicted Member
Nevermind I figured out!
Thanks for the help
-
Mar 17th, 2004, 01:12 PM
#6
Anytime..
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|