Results 1 to 9 of 9

Thread: Moving Gradient Line

  1. #1

    Thread Starter
    Hyperactive Member JazzBass's Avatar
    Join Date
    Jun 1999
    Posts
    393

    Smile

    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
    JazzBass
    In the .NET era
    Trying to remember VB6
    Progress:
    XP Professional @ Home
    and @ the Office

  2. #2
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    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...
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

  3. #3

    Thread Starter
    Hyperactive Member JazzBass's Avatar
    Join Date
    Jun 1999
    Posts
    393

    Thanks

    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
    JazzBass
    In the .NET era
    Trying to remember VB6
    Progress:
    XP Professional @ Home
    and @ the Office

  4. #4
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    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.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  5. #5

    Thread Starter
    Hyperactive Member JazzBass's Avatar
    Join Date
    Jun 1999
    Posts
    393

    Thanks

    Thanks,

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

    JazzBass
    JazzBass
    In the .NET era
    Trying to remember VB6
    Progress:
    XP Professional @ Home
    and @ the Office

  6. #6
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    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...
    Attached Files Attached Files
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

  7. #7

    Thread Starter
    Hyperactive Member JazzBass's Avatar
    Join Date
    Jun 1999
    Posts
    393

    Smile Thank you PsychoMark

    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
    Last edited by JazzBass; Mar 16th, 2001 at 10:46 AM.
    JazzBass
    In the .NET era
    Trying to remember VB6
    Progress:
    XP Professional @ Home
    and @ the Office

  8. #8
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    You're welcome...

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

    Good luck!
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

  9. #9

    Thread Starter
    Hyperactive Member JazzBass's Avatar
    Join Date
    Jun 1999
    Posts
    393

    Smile Thanks

    Thanks PsychoMark.
    JazzBass
    In the .NET era
    Trying to remember VB6
    Progress:
    XP Professional @ Home
    and @ the Office

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width