Adblock breaks this site

New Progress Bar Control

Discussion in 'Programming General' started by jdsfighter, Jun 10, 2008.

  1. jdsfighter

    jdsfighter Forum Addict
    Visual Basic Programmers

    Joined:
    Jan 21, 2007
    Posts:
    603
    Referrals:
    0
    Sythe Gold:
    0
    New Progress Bar Control

    EDIT:
    Ok guys, the next version has been released and is available from the same download link as before. I am looking for an actual name to call this rather than just progress bar. So go ahead and feed them to me. :)
    END EDIT

    Well I saw the new SwiftKit and I saw this really cool progress bar control that they had. I thought it would be useful to have, but its not like they would just hand it over. So I decided to make my own version.

    I whipped this up late last night, so it isn't perfect. I am sure there are many ways to shorten the code and I bet it can be made better, but for now I'll leave it as is. I am going to add the ability to change the font of the percentage, but that will come later.

    I've never even so much as drawn with an API before so this was completely new to me. Also I've never made a usercontrol, but this was some good experience.

    Version: 1.0.1

    Features:
    Code:
    Able to set the background color (using 2 colors)
    Able to set the fill color (using 2 colors)
    Able to enable, disable gradients
    Able to change font color
    Able to disable percentage
    Able to add a drop shadow
    Able to set border color
    Min and Max values.
    Update Log:
    Code:
    '||||||||||||||||||||||||||||||||||||||||||||||||
    '|                   UPDATE LOG                 |
    '| times are all central time (GMT -6)          |
    '|                                              |
    '| June  8, 2008 - 11:30PM                      |
    '|               - Work Begins                  |
    '|                                              |
    '| June 10, 2008 - 11:10PM                      |
    '|               - stream-lined code            |
    '|                 removed many unnecessary     |
    '|                 calculations and calls.      |
    '|               - added Min and Max value      |
    '|                                              |
    '||||||||||||||||||||||||||||||||||||||||||||||||
    Benchmark Tests
    Code:
    Tested at 10000 loops
    Microsoft Common Controls: 812ms
    ProgressBar Control V 1.0.0: 5250ms | 84.5% less efficient at 10000 loops
    ProgressBar Control V 1.0.1: 4688ms | 82.7% less efficient at 10000 loops
    
    Pictures:
    [​IMG]

    Download
    www.pspools.net/jdh/Downloads/ProgressBar.ctl
     
  2. Darthatron

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0
    New Progress Bar Control

    Looks nice, however I would recommend adding the Min/Max Functions, for user simplicity. Other than that it's very nice. I hope that you keep updating it. :)
     
  3. 0h n035

    0h n035 Active Member

    Joined:
    Feb 1, 2007
    Posts:
    163
    Referrals:
    0
    Sythe Gold:
    0
    New Progress Bar Control

    Very very nice. Make more :D
     
  4. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    New Progress Bar Control

    Sweet as ima download this and leech it :D
    Btw why didn't you just use shapes to show the progress? (If you did use shapes you wouldn't be able to do the drop shadow effect)

    Good job.
     
  5. jdsfighter

    jdsfighter Forum Addict
    Visual Basic Programmers

    Joined:
    Jan 21, 2007
    Posts:
    603
    Referrals:
    0
    Sythe Gold:
    0
    New Progress Bar Control

    What are you saying here covey lol? Are you trying to say I wouldn't have been able to draw a drop shadow if I used shapes?

    Well the main reason I didn't do that is because I didn't want to use any controls on this, unless I had to throw in a timer or something. I wanted this to all be done with code.
     
  6. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    New Progress Bar Control

    Still great work, i'll actually learn from this when i download it because i've never used the drawing API ;)
     
  7. Visual Basic Matt

    Visual Basic Matt Apprentice

    Joined:
    Jan 29, 2008
    Posts:
    647
    Referrals:
    2
    Sythe Gold:
    56
    Discord Unique ID:
    223154494878253056
    New Progress Bar Control

    Great work, it look's really good. Definitely going to use as a reference for me. Will help alot. Thank's
     
< Visual basic 8 Keygen? or portable? | Rs programs >


 
 
Adblock breaks this site