PDA

Click to See Complete Forum and Search --> : Moving Gradient Line


JazzBass
Mar 16th, 2001, 08:07 AM
Hi,
I was wondering if anyone knows how to get a gradient line moving effect like when Windows 95, ME, Windows 2000 are booting up. I have some code that fills a picture box, but not able to make it look like it's scrolling.

Thanks,
JazzBass

PsychoMark
Mar 16th, 2001, 08:44 AM
All you need is two pictureboxes, one invisible which has the gradient on it (start-end-start colored, so it can be tiled) and another which is shown to the user, you can then use a timer to change the X value every time and use BitBlt to draw the final image.

If you don't know how to do this, post a reply and I'll fix some code for you...

JazzBass
Mar 16th, 2001, 08:48 AM
I think I get it,
but if you have any extra time, some code would be nice. Graphics are not really my forte.

Thanks again PsychoMark!
JazzBass

Sastraxi
Mar 16th, 2001, 08:49 AM
If you need a refresher course on BitBlt, check out this article I recently wrote:

http://vbden.tripod.com/articles/invmask.htm

It covers the basics of Bitblt as well as inverted masks.

JazzBass
Mar 16th, 2001, 09:23 AM
Thanks,

I'll take a look at that. This is my first time diving into graphics.

JazzBass

PsychoMark
Mar 16th, 2001, 09:33 AM
If you're interested, I've created a little sample project and attached it here...

The sample uses a bitmap for the gradient which I created before, but you can also create the gradient at runtime...

JazzBass
Mar 16th, 2001, 09:42 AM
Beautiful!

Thank you very much for your help and time. That's exactly what I needed. I love your gradient. How did you create it. The only graphics program I have that comes remotely close is Star Office Draw.

I'll do some reading on bitblt so I can understand your code.

Thank you again,
JazzBass

PsychoMark
Mar 16th, 2001, 09:45 AM
You're welcome...

The gradient was created with Paint Shop Pro 6 (http://www.jasc.com/)...

Good luck!

JazzBass
Mar 16th, 2001, 09:52 AM
Thanks PsychoMark.